0

JavaScript - let statement

Please help me understand this example What is this codes output ? let a = [ 1 , 3 , 5 ] [ 2 ] ; let b = { x : 4 , y : 10 } .y ; let c = " 199 " [ 0 ] ; console.log ( a + b + c ) ; Answer: 151

2nd Feb 2021, 11:51 AM
Geką
Geką - avatar
2 ответов
+ 1
a=5 b=10 c="1" and if you add them you get 151 Now what exactly you don't understand in this?
2nd Feb 2021, 12:05 PM
Abhay
Abhay - avatar
+ 1
Why a is 5, b is 10 and c is 1 in quotes? I do not understand
2nd Feb 2021, 12:27 PM
Geką
Geką - avatar