+ 1

Why it output as 1 instead of 3

var a; var object={ a:1, b:function() {var a:3} } object.b(); shows results as 1 but not 3 why?

23rd Aug 2018, 5:40 AM
Karthick
Karthick - avatar
1 Respuesta
+ 5
'b' should be "function(){object.a = 3}"
23rd Aug 2018, 7:44 AM
Mert Yazıcı
Mert Yazıcı - avatar