Please explain why? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula gr√°tis
+ 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 Respostas
+ 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
+ 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