while declaring array or object using 'name' as array name or object name with keyword 'var', that array and object converted into string, other keywords like 'let' and 'const' working normally
This isn't a bug; it's because in a browser, assigning to name while in the global scope sets the window.name property, and the HTML spec coerces your array into a string when doing so.
I found this bug in javascript..
while declaring array or object using 'name' as array name or object name with keyword 'var', that array and object converted into string, other keywords like 'let' and 'const' working normally
find the attachment for your reference