Prev Demo
JavaScript
>
Array Declaring
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html> <head> <title>Demo</title> </head> <body> <script> function TestFunction() { var array = new Array(); array[0] = "IT"; array[1] = "Funda"; array[2] = "Corporation"; for (var i = 0; i < 3; i++) { alert(array[i]); } } </script> <input type="button" id="btnTest" onclick="TestFunction()" value="Testing"/> </body> </html>
Note: We DO NOT save your trial code in our database.
Output