+ 1

Please explain why?

let a=(1,2,3); console.log(a) // output >> 3

1st Dec 2020, 3:51 PM
Absolute Zero ϟ
Absolute Zero ϟ - avatar
5 Answers
+ 4
This is because, it assigns 1, 2, 3 one by one to a That is, first 1 is Assigned, then 2 and then 3 at last.. so the final answer is 3.
1st Dec 2020, 3:55 PM
Charitra
Charitra - avatar
1st Dec 2020, 3:56 PM
Charitra
Charitra - avatar
+ 4
Artur I dont actually use Javascript, but I dont think it has any practical implementation. By the way, it was really a good question 𝕽𝖆𝖏𝖓𝖎𝖘𝖍⁠𝖆𝖓𝖆𝖓𝖉⁠⁠ . Keep it going.
1st Dec 2020, 7:46 PM
Charitra
Charitra - avatar
+ 1
Charitra Agarwal Thank you 😊
1st Dec 2020, 3:56 PM
Absolute Zero ϟ
Absolute Zero ϟ - avatar
+ 1
Charitra Agarwal First time I see such thing in js. Is there any practical use of it?
1st Dec 2020, 7:39 PM
Artur
Artur - avatar