//Very simple, given an integer or a floating-point number, find its opposite. //Examples: //1: -1 //14: -14 //-34: 34 function opposite(number){ let oppNum = 0 - number return oppNum; }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter