+ 1
What's the value of elem variable in this code ? explain how || var elem = (1,2,3,3,4,6,5);
var elem = (1,2,3,3,4,6,5);
4 Respuestas
+ 4
Safaa Alnabhan
The value is 5 because of your use of the comma operator.
"The comma operator evaluates each of its operands (from left to right) and returns the value of the last operand." MDN
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comma_Operator
MDN, W3Schools, GeekforGeeks, TutorialsPoint are excellent programing language references and can help you gain a deeper level of understanding on your journey to becoming a master coder.
+ 2
The value is 5 but why
+ 2
You are welcome.
+ 1
ODLNT thank you for your answer ☺