re: Different type of functions in JavaScript VIEW POST


Very comprehensive!

Couple of typos:

Your default parameters examples has ; instead of , between the arguments

const multiply = (a = 2, b = 3, c = 1) => a * b * c;

You're missing a ' on your new Function example:

var sum = new Function('a', 'b', 'return a + b');

(I love that you introduce the Function constructor by the way - hours of fun for everyone there)


Bull's eye man! truly I have read my post more than 10 times :) and two of my friends proofread it but no one figured it out. I will be more prepared next time. thanks.

code of conduct - report abuse