My Report

JavaScript Basic Online Test – 1


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. What will be the output of the following JavaScript code?

<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML = typeof "John" 
</script>

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

<p id="demo"></p>
var txt1 = "good";
var txt2 = "day";
document.getElementById("demo").innerHTML = txt1 + txt2;

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

<p id="demo"></p>
<script>
txt1 = “ one”;
txt1 += “two”;
document.getElementById("demo").innerHTML = txt1;
</script>

4. JavaScript is ideal to ________

5. JavaScript can be written __________

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

<p id="demo"></p>
<script>
var x = 10;
x *= 5;
document.getElementById("demo").innerHTML = x;
</script>

7. JavaScript Code can be called by using ____________

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

<p id="demo"></p>
<script>
var x = 5;
var y = 2;
var z = x % y;
document.getElementById("demo").innerHTML = z;
</script>

9. Which of the following Attribute is used to include External JS code inside your HTML Document?

10. Which attribute is used to specify that the script is executed when the page has finished parsing? (only for external scripts)

11. The main purpose of a "Live Wire" in NetScape is to ________

12. The script tag must be placed in __________

13. A proper scripting language is a __________

14. The web development environment (JavaScript) offers which standard construct for data validation of the input entered by the user.

15. A JavaScript program developed on a Unix Machine ________


 

Start practicing “1000 MCQs on JavaScript”, and once you are ready, you can take tests on all topics by attempting our “JavaScript Test Series”.

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.