My Report (&Account)

JavaScript Online Test


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

Here is the complete list of test quizzes on JavaScript.

1. What is the purpose of the UgilifyJS?

Question 1 of 50

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

var  obj=
{
	length:20,
	height:35,
}
if (‘breadth' in obj === false) 
{
  	obj.breadth = 12;
}

console.log(obj.breadth);

Question 2 of 50

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

function counth2()
{  
    var totalh2=document.getElementsByTagName("h2");  
    alert("totalh2.length);  
}  
<h2>hello</h2>  
<h2>hello</h2> 

Question 3 of 50

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

       console.log(Pattern.matches("[amn]", "abcd"));

Question 4 of 50

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

let size = 5;
let a = 5;
for (let j = size; j >= 0; j=a) {
    document.write(a);
    a = a - 2;
}

Question 5 of 50

6. What is the difference between the two lines in the following JavaScript code?

!!(obj1 && obj2);
(obj1 && obj2);

Question 6 of 50

7. Which is the method that removes the current document from the browsing history before loading the new document?

Question 7 of 50

8. Which identifier is used to represent a web browser window or frame?

Question 8 of 50

9. What is the purpose of data format validation?

Question 9 of 50

10. The style property belongs to which of the following object?

Question 10 of 50

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

Question 11 of 50

12. Which property lays the element according to the normal flow?

Question 12 of 50

13. How to get a particular value using the tagged name?

Question 13 of 50

14. Which of the following layer retrieves the content from the network?

Question 14 of 50

15. How many methods are there in the History object?

Question 15 of 50

16. The basic purpose of the toLocaleString() is to _________

Question 16 of 50

17. What is the purpose of the method ActiveXObject()?

Question 17 of 50

18. What will be the output of the following JavaScript statement?

var grand_Total=eval("10*10+5");

Question 18 of 50

19. Which tag can handle mouse events in Netscape?

Question 19 of 50

20. The blobs are generally stored in ____________

Question 20 of 50

21. A JavaScript program developed on a Unix Machine ________

Question 21 of 50

22. The code of the R language has an extension?

Question 22 of 50

23. What is the lifetime of the data stored through localStorage?

Question 23 of 50

24. How can we make methods available on all objects?

Question 24 of 50

25. Which of the following is not the value the key property will hold if the key is a function key?

Question 25 of 50

26. Which of the following can be used to configure the scope of the Cookie visibility?

Question 26 of 50

27. How many reserved words are there in JavaScript?

Question 27 of 50

28. Which is the game that requires extremely minified source in the Perl culture?

Question 28 of 50

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

var b5 = Boolean('false');
document.getElementById("demo").innerHTML =b5;

Question 29 of 50

30. Which of the following is not a WebSocket event?

Question 30 of 50

31. Which of the following method loads a new document?

Question 31 of 50

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

<p id="demo"></p>
<script>
var x = 'It\'s';
document.getElementById("demo").innerHTML = x ; 
</script>

Question 32 of 50

33. What is the procedure to view the console in the Firefox?

Question 33 of 50

34. What is the purpose of the assign() method?

Question 34 of 50

35. Why do we need to create locally scoped variables to hold value?

Question 35 of 50

36. Do functions in JavaScript necessarily return a value?

Question 36 of 50

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

<p id="demo"></p>
<script>
function myFunction() 
{
   var str = "Hellooo World!"; 
   var patt1 = /o+/g;
   var result = str.match(patt1);
   var count=0;
   While(result[i]!=NULL)
   {
       If(result[I]==o)
       count++;
   }
   document.getElementById("demo").innerHTML = count;
}
</script>

Question 37 of 50

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

<p id="demo"></p>
<script>
function myFunction() 
{
     document.getElementById("demo").innerHTML = Math.LN10;
}
</script>

Question 38 of 50

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

<p id="demo"></p>
<script>
var x = 9.656;
document.getElementById("demo").innerHTML =
  x.toFixed(0)
</script>

Question 39 of 50

40. Which of the following navigator object properties is the same in both Netscape and IE?

Question 40 of 50

41. What is the advantage of the code produced graphics being smaller than the images themselves?

Question 41 of 50

42. The video and the audio belong to the _________

Question 42 of 50

43. What would be the result or type of error if p is not defined in the following JavaScript code snippet?

console.log(p)

Question 43 of 50

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

function output(object)
{
	var place=object ? object.place : “Italy”;
	return “clean:”+ place;
}
console.log(output({place:India}));

Question 44 of 50

45. What is a heap in JavaScript?

Question 45 of 50

46. The main purpose of JavaScript in web browser is to ___________

Question 46 of 50

47. What will be the output of the following JavaScript code if oddsums(5); is executed after the following code snippet?

function oddsums(n) 
{
     let total = 0, result=[]; 
     for(let x = 1; x <= n; x++) 
     { 
        let odd = 2*x-1; 
        total += odd;
        result.push(total);
     }
     return result;
}

Question 47 of 50

48. When is an application said to show a web performance?

Question 48 of 50

49. What are the goals for using Firebug?

Question 49 of 50

50. Which of the following is not the property of the video tag?

Question 50 of 50


 

Topic wise Test Quizzes on JavaScript

JavaScript tests, quizzes, and exams are great ways to learn and test your JavaScript skills. Whether you’re a beginner or experienced, challenge and boost your confidence with our engaging online quizzes on JavaScript Basics, Array, Classes, Loops, Objects, Cookies, Events, Graphics, Parsing, and Advanced JavaScript. Start the JavaScript online test now!



JavaScript Certification Test

JavaScript Certification Test is a free certification exam. However, you need to score an A grade in each of the "Certification Level Tests 1 to 10" to be eligible to take part in this certification test. So, take all the "10 Tests" starting from Certification Level 1 upto Level 10, before taking the final Certification test.


Level 1 to 10 Tests:
Total Questions: 25, Total Time: 30 min, Correct Answer: 2 points, Wrong Answer: -1 point

Certification Test:
Total Questions: 50, Total Time: 1 hour, Correct Answer: 2 points, Wrong Answer: -1 point

JavaScript Internship Test

If you scored either Grade A* or Grade A in our JavaScript Internship Test, then you can apply for Internship at Sanfoundry in JavaScript.


Total Questions: 50, Total Time: 1 hour, Correct Answer: 2 points, Wrong Answer: -1 point

JavaScript Job Test

It is designed to test and improve your skills for a successful career, as well as to apply for jobs.


Total Questions: 50, Total Time: 1 hour, Correct Answer: 2 points, Wrong Answer: -1 point

Note: Before you get started on these series of online tests, you should practice our collection of 1000 MCQs on JavaScript .

Sanfoundry Scoring & Grading System

Sanfoundry tests and quizzes are designed to provide a real-time online exam experience. Here is what you need to know about them.

  • Scoring System: You get 2 points for each correct answer but lose 1 point for every wrong answer.
  • Grading System: Your grade depends on your final score and can be one of the following:

    • Grade A* - Genius (100%)
    • Grade A - Excellent (80% to 99%)
    • Grade B - Good (60% to 80%)
    • Grade C - Average (40% to 60%)
    • Grade D - Poor (0% to 40%)
advertisement
advertisement
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.