a Given the following code segment:

<html>
	<body>
	<script type=”text/JavaScript”>
	Var mypets=new Array ()
	mypets [0] =”cat”
	mypets [1] =”dog”
	mypets [2] =”rabbit”

b Use for statement to output the values of the array mypets
c Explain the output of the following JavaScript statements

Var age =24
	Var allowed=(age>18)? “Yes”: “No”;

d What is the significance of the operator used in (c) above

What is your question related to these JavaScript problems? What effort have you done here besides dumping all problems on the forum? Have you had any answer for these problems? Show us what you have done, and you may ask us to correct or get a feed back on your answers...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.