Javascript interview questions part 28

Javascript interview questions part 28

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. Which method is used to add a binding?

Correct Answer is : bind()

2. Which method is used to remove a binding?

Correct Answer is : unbind()

3. Which of the following are the parameters passed to the keymap after installation?

Correct Answer is : Keydown event’s object

4. What is the purpose of lazy loading?

Correct Answer is : Immediate loading is not necessary

5. Where is the external JavaScript placed in the case of lazy loading?

Correct Answer is : After window.onload event

6. What are the parameters of the attachEvent function?

Correct Answer is : Event, Function

7. What is the result when the showPerformanceMetrics() is called before loading the remote script?

Correct Answer is : Throws an error

8. Which of the following is an attribute to the script object?

Correct Answer is : onload

9. Which is the method used to add an event listener?

Correct Answer is : addEventListener()

10. What is the purpose of the domLoading attribute?

Correct Answer is : Document begins to load

11. How is the render time calculated?

Correct Answer is : Date.Now() – performance.timing.domLoading

12. The object whose properties are inherited by all instances of the class, and properties whose values are functions behaving like instance methods of the class, is _____________

Correct Answer is : Prototype object

13. You can refresh the webpage in JavaScript by using

Correct Answer is : location.reload

14. What is the initial step to set up a CSS Lazy Loading?

Correct Answer is : Fetching data

15. Consider the following code snippet : What is being done in the above code in JavaScript?

Correct Answer is : Event and EventListener is created according to the if-else

16. What is the purpose of holding whatever tag you create in the attribute type?

Correct Answer is : To identify the scripting language

17. What does the appendChild() method perform?

Correct Answer is : Appends a node as the last child

18. Consider the following code snippet : What is being done in the above function in JavaScript?

Correct Answer is : JS and CSS files are loaded

19. What should be the value of the type attribute of a variable if the type of file is CSS?

Correct Answer is : text/css

20. How to lazy load images?

Correct Answer is : Remove the src attribute

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon