My Report

JavaScript Practice Test 4


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

1. The inner frame within a top-level window can be referred to as _____________

2. The paragraph "p" is a part of __________

3. Which property is used to obtain browser vendor and version information?

4. What will be the output of the following JavaScript code?

<p id="demo">head</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() 
{
   var x = document.getElementById("demo");
   x.innerHTML = x.attributes[0].isId;
}
</script>

5. Why is the replace() method better than the assign() method?

6. Which is the preferred testing nowadays for scripting?

7. Which of the following frameworks focuses on DOM and Ajax utilities?

8. What will be the output of the following JavaScript code?

function myFunction() 
{
  var x = "";
  document.getElementById("demo").innerHTML = Boolean(x);
}

9. What will be the output of the following JavaScript code?

function getcube()
{  
    var number=document.getElementById("number").value;  
    alert(number*number*number);  
}
<form>  
     Enter No:<input type="text" id="number" value="3" name="number"/><br/>  
     <input type="button"  value="ok" onclick="getcube()"/>  
</form>

10. The C in CSS stands for _______________


 

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.