<script
type="text/javascript">
var days = new Array();
days[0] = "Sunday"
days[1] = "Monday"
days[2] = "Tuesday"
days[3] =
"Wednesday"
days[4] =
"Thursday"
days[5] = "Friday"
days[6] =
"Saturday"
document.write("first
day is "+days[0])
</script>
This produces
first day is Sunday
A more compact way of
creating an array is the literal notation:
<script
type="text/javascript">
var days =
["Sunday","Monday","Tuesday","Wednesday",
"Thursday","Friday","Saturday"];
document.write("first
day is "+days[0]) </script>
This produces
first day is Sunday
http://advancedjavascriptinterview.blogspot.in/2015/06/how-tp-create-arrays-using-javascript.html
ReplyDeletehttp://astutejs.blogspot.in/2015/07/extjs-simple-extjs-grid.html
ReplyDelete