When I launch var name = [1,2,3]in the Chrome console and then access the value name, I return "1,2,3". Why is this so?
var name = [1,2,3]
name
"1,2,3"
What you see is a global variable that is part of an object window. This is actually the value that the browser uses that reflects the name of the window. (see documentation )
window
window.name - getter/setter, . ( " ", var name window.name - . ( , , )
window.name
var name
Source: https://habr.com/ru/post/1599435/More articles:Sharing REST tokens between servers - javaManaging configurations after creating an Ember application - ember.jsAn eloquent query using a join to get a pivot table and its associated data - phpProtractor How to click on an empty space - javascriptGolang variable inside json field tag - goRemoving a subdocument from an array using id and user restriction - javascriptColor uniformity in javascript - javascriptRuby placed inline random numbers - iteratorDisable variable declaration in Perl 6 - perl6When are static class variables separated? - oopAll Articles