JavaScript Questions

0 votes, 0 avg
622

JavaScript Questions

1 / 15

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

console.log(p)

2 / 15

2. Which of the following is not considered as an error in javascript?

3 / 15

3.  Which of the following can be implemented using animation?

4 / 15

4. in javascript “===” operator defines what?

5 / 15

5. What is the main difference between var and let keywords in JavaScript?

6 / 15

6.  If A is the superclass and B is the subclass, then subclass inheriting the superclass can be represented as _________

7 / 15

7. Which of the following methods is used to access HTML elements using Javascript?

8 / 15

8. Which object in Javascript doesn’t have a prototype?

9 / 15

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

var cars = ["Honda","Hyundai","Mahindra"];
 
 var result = cars.shift();
 
 document.writeln("Result: ", cars);

10 / 15

10. Arrays in JavaScript are defined by which of the following statements?

11 / 15

11. Which one of the following is correct output for the following given JavaScript code if there is a p tag with id=demo ?
functionourFunction()
{
document.getElementById(“demo”).innerHTML=Math.abs(-7.25);
}

12 / 15

12. Which JavaScript method is used to write into an alert box?

13 / 15

13. Which of the following is the language of javascript?

14 / 15

14.  Where is Client-side JavaScript code is embedded within HTML documents?

15 / 15

15. Arrays in JavaScript are defined by which of the following statements?

Your score is

0%

Written by Shubhranshu Shekhar, who has trained 20000+ students in coding.

Scroll to Top