Html – Js Array gives null
Why Array gives null outside script onclick event in htm5? The others variables works correctly. <!DOCTYPE html> <html> <head> <title>Array</title> <script> var list = new Array("andrea", "matteo", "marco"); var x = "andrea"; </script> </head> <body> <input type="button" value="click" onclick="alert(list[0]);"> </body>…