let getA = a => a*a; console.log(getA(2)) var b = 5 // outside the scope let square = () => {return b*b}; console.log(square()) // inside the scope let square = (b) => {return b*b}; console.log(square(9)) let double = function(b){ return b*b }; console.log(double(10))
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