What will be the result of the following code?

var foo = function(){
            a: 1,
            b: 2,
            c: 3
SyntaxError will be thrown because after the return there is a line break and the compiler will automatically add a semicolon there. That will result a syntax error.

This is quite tricky question!

2018 Jun 20, 10:31:41 AM

+Vitia Dychko, now it is fixed) thanks

2015 Aug 27, 11:36:10 AM

Some troubles with translation.

2015 Aug 16, 5:47:40 PM

Слідкуй за CodeGalaxy

Мобільний додаток Beta

Get it on Google Play
Зворотній Зв’язок
Зареєструйся Зараз
або Підпишись на майбутні тести