Arrow functions
Arrow functions added in ES6 provide a good replacement for function expressions. But do you understand them completely? This is a small test to check it out.
-
(_ => _)(99) -
((x=>{})(),(x=>x=>x)())(()=>true)(false) -
null => null -
null, undefined => null -
(({})({})) -
(() => {x:1})() -
(() => ({x:1}))() -
(() => arguments)(99) -
((x,y,z) => (1,2,3))(4,5,6) -
() => () => () => {} -
() => {} == () => {} -
(() => { return this;})() -
() => () -
(() => {return})() -
x => false() -
(() => [()=>(1)])()[0]() -
(let => let)('Really?') -
(const => const)('Really again?') -
var y = (var) => {var} -
`${() => 3}` -
(() => Function()())() -
typeof ()=>{}
Correct answers :
Incorrect answers :
Unanswered :
For all explanations to above question please see the article