Junk Array
<HTML>
<HEAD>
<TITLE> Arrays with different type of Elements </TITLE>
</HEAD>
<BODY>
<P ALIGN="CENTER"><U><B> THE CONTENTS OF ARRAY JUNK </B></U></P>
<SCRIPT LANGUAGE="Javascript">
Junk = new Array ("Hello","Boys",12,12.3,True,False);
document.write("<BR>"+"Junk[0] \t\t= "+Junk[0] );
document.write("<BR>"+"Junk[1] \t\t= "+Junk[1] );
document.write("<BR>"+"Junk[2] \t\t= "+Junk[2] );
document.write("<BR>"+"Junk[3] \t\t= "+Junk[3] );
document.write("<BR>"+"Junk[4] \t\t= "+Junk[4] );
document.write("<BR>"+"Junk[5] \t\t= "+Junk[5] );
document.write("<BR>"+"Length of Junk = "+Junk.length);
document.write("<BR>"+"Hello+Boys = "+Junk[0]+Junk[1]);
document.write("<BR>"+"12+12.34 = " );
document.write(Junk[2]+Junk[3]);
document.write("<BR>"+" True+False = ");
document.write(Junk[4]+Junk[5]);
</SCRIPT>
</BODY>
</HTML>
0 comments:
Post a Comment