+ 1

Array mistakes

https://code.sololearn.com/WF4rph8LofG6/?ref=app The variable "name" is converted to string and now outputs a random text. Why?

5th Sep 2020, 2:02 PM
Sali65
Sali65 - avatar
1 Respuesta
+ 2
Because there is a window property name So var name is not declaring a new variable, instead it is referring to window.name Rename your variable to something else.
5th Sep 2020, 4:06 PM
Gordon
Gordon - avatar