Forbrukslån på Dagen | Näppäimistö | Kredittkort med lavest Rente | Billig Strøm | Billigste Hyttealarm 2017 | Forsikringer | Billigste Mobilabonnement | Billigste Bredbånd
JavaScript programming

Array javascript tutorial

In simple terms Array (Array) List of variables, or variables tables. Data storage space is reserved for variables. But in general, only one variable data can be stored. With the same name but a different variable to declare a complex process. This problem can be eliminated by using Array. Where only one variable name is enough. For example, var name0 = “Rahim”; var name1 = “Karim”; var name2 = “Abdulla”; var name3 = “Manik”; Instead var name = new Array ( “Rahim”, “Karim”, “Abdulla”, “Manik”); If you use the same work.

Practice Project:

html>
<head>
<title> www.trickbd.com.bd</title>
<style>
body{background: #FFC;
font-size:20px;}
h2{color:#FF0066;}
</style>

</head>
<body>
<script type = “text/javascript”>
document.write(“<h2>Example of manual variable</h2>”);
var name0 = “Rahim”;
var name1 = “Karim”;
var name2 = “Abdulla”;
var name3 = “Manik”;
document.write(name0);
document.write(“<br />”);
document.write(name1);
document.write(“<br />”);
document.write(name2);
document.write(“<br />”);
document.write(name3);
document.write(“<br />”);
</script>
<script type = “text/javascript”>
document.write(“<h2>Example of Array </h2>”);
var name = new Array(“Rahim”,”Karim”,”Abdulla”,”Manik”);
document.write(name[0]);
document.write(“<br />”);
document.write(name[1]);
document.write(“<br />”);
document.write(name[2]);
document.write(“<br />”);
document.write(name[3]);
document.write(“<br />”);
</script>
</body>

</html>

Notepad: to open a file type from the menu at the top of layer code by clicking on the Save as File name: index.html, Save as type: All files, save and open the index.html file with the Mozilla Firefox look like the image shown below.

Example of manual variable

Rahim
Karim
Abdulla
Manik

Example of Array

R
a
h
i

 

Comments

comments

About the author

Toriqul Islam Tusher

বলার মত কিছু নাই!

Leave a Comment