JavaScript Array For Loop
home
Run
screen_rotation
fullscreen
cloud_download
navigate_before
navigate_next
<html> <head> <title>Javascript Array</title> <script> function getLastItem(){ var myArray = ["10","11","20","23","98","101"]; var lastIndex = myArray.length; document.write("Last Element in array = "+myArray[lastIndex]+""); } </script> </head> <body > <button type="button" onclick="getLastItem()">Get Array</button> </body> </html>
<html> <head> <title>Javascript Array</title> <script> function getLastItem(){ var myArray = ["10","11","20","23","98","101"]; var lastIndex = myArray.length; document.write("Last Element in array = "+myArray[lastIndex]+""); } </script> </head> <body > <button type="button" onclick="getLastItem()">Get Array</button> </body> </html>
Copyrights@tutorialsplane.com