ASP.NET and JavaScript Fundamentals

Test your knowledge of core web development technologies including ASP.NET 2.0 features and JavaScript programming fundamentals covering syntax, functions, loops, and browser interactions.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

What is the correct syntax for referring to an external script called "xxx.js"?

  1. <script src="xxx.js">
  2. <script name="xxx.js">
  3. <script href="xxx.js">
  4. <script id="xxx.js">
Question 2 True/False

An external JavaScript must contain the

  1. True
  2. False
Question 3 Multiple Choice (Single Answer)

How do you write "Hello World" in an alert box?

  1. alert("Hello World")
  2. alertBox="Hello World"
  3. alertBox("Hello World")
  4. msgBox("Hello World")
Question 4 Multiple Choice (Single Answer)

How do you create a function?

  1. function myFunction()
  2. function=myFunction()
  3. function:myFunction()
  4. function myFunction
Question 5 Multiple Choice (Single Answer)

How do you call a function named "myFunction"?

  1. call myFunction()
  2. call function myFunction
  3. myFunction()
  4. call function myFunction()
Question 6 Multiple Choice (Single Answer)

How do you write a conditional statement for executing some code if "i" is equal to 5?

  1. if (i==5)
  2. if i=5 then
  3. if i=5
  4. if i==5 then
Question 7 Multiple Choice (Single Answer)

How do you write a conditional statement for executing some code if "i" is NOT equal to 5?

  1. if =! 5 then
  2. if (i != 5)
  3. if (i <> 5)
  4. if <> 5
Question 8 Multiple Choice (Single Answer)

How does a "while" loop start?

  1. while (i<=10)
  2. while (i<=10;i++)
  3. while i=1 to 10
  4. while (i=0;i<=10;i++)
Question 9 Multiple Choice (Single Answer)

How does a "for" loop start?

  1. for (i = 0; i <= 5)
  2. for i = 1 to 5
  3. for (i <= 5; i++)
  4. for (i = 0; i <= 5; i++)
Question 10 Multiple Choice (Single Answer)

How can you add a comment in a JavaScript?

  1. //This is a comment
  2. <!--This is a comment-->
  3. 'This is a comment
  4. /*This is a comment
Question 11 Multiple Choice (Single Answer)

What is the correct JavaScript syntax to insert a comment that has more than one line?

  1. <!--This comment has more than one line-->
  2. //This comment has more than one line//
  3. /This comment has more than one line/
  4. 'This comment has more than one line
Question 12 Multiple Choice (Single Answer)

What is the correct way to write a JavaScript array?

  1. var txt = new Array(1:"tim",2:"kim",3:"jim")
  2. var txt = new Array("tim","kim","jim")
  3. var txt = new Array:1=("tim")2=("kim")3=("jim")
  4. var txt = new Array="tim","kim","jim"
Question 13 Multiple Choice (Single Answer)

How do you round the number 7.25, to the nearest integer?

  1. round(7.25)
  2. Math.round(7.25)
  3. rnd(7.25)
  4. Math.rnd(7.25)
Question 14 Multiple Choice (Single Answer)

How do you find the number with the highest value of x and y?

  1. Math.max(x,y)
  2. top(x,y)
  3. Math.ceil(x,y)
  4. ceil(x,y)
Question 15 Multiple Choice (Single Answer)

What is the correct JavaScript syntax for opening a new window called "w2" ?

  1. w2=window.open("http://www.w3schools.com");
  2. w2=window.new("http://www.w3schools.com");
  3. w2=window("http://www.w3schools.com");
  4. w2=openwindow("http://www.w3schools.com");
Question 16 Multiple Choice (Single Answer)

How do you put a message in the browser's status bar?

  1. window.status = "put your message here"
  2. status("put your message here")
  3. statusbar = "put your message here"
  4. window.status("put your message here")
Question 17 Multiple Choice (Single Answer)

How can you find a client's browser name?

  1. browser.name
  2. navigator.appName
  3. client.navName
  4. All the above
Question 18 Multiple Choice (Single Answer)

How many bit support does ASP.NET 2.0 provide?

  1. 16-bit support
  2. 32-bit support
  3. 64-bit support
  4. 128-bit support
Question 19 True/False

ASP.NET 2.0 is not fully backward compatible with ASP.NET previous versions.

  1. True
  2. False
Question 20 Multiple Choice (Single Answer)

Which of the following features of ASP.NET 2.0 provides 'visual inheritance'

  1. Themes
  2. Site Navigation
  3. Gird View
  4. Master Pages