initialization - when does javascript initialize vars? -


var x = ["aaa", "bbb", "ccc", ...]; function f() {   var y = ["aaa", "bbb", "ccc", ...]; } 

it big array, @ least in opinion.

i assume y gets initialized again @ every instance.

would global x initialized 1 time when page loaded? seems reasonable...

yes (+27 chars satisfy so!)


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -