Zed-King Study app · Free
O Level students across India practise here, free
Google login · no Play Store needed
About this PDF
M2 Chapter 6 MCQ — JavaScript and AngularJS: variables, operators, conditions, loops, functions, events and form validation, then AngularJS basics. Answers highlighted, with golden exam lines and quick revision notes.
This is part of the free O Level M2-R5.1 study material in the Zed-King Study Zone. You can read every page above in your browser, or download the file and study offline. Zed-King Group of Institute is a NIELIT Study Centre in Kaithal, Haryana, and all of this material follows the current NIELIT syllabus.
- Course
- O Level — NIELIT Foundation Diploma
- Module
- M2 — M2-R5.1: Web Designing and Publishing
- Section
- Chapterwise MCQ
- Format
- PDF — read online or download
- Price
- Free, no sign-up required
Text from this PDF
The opening pages as plain text — open the reader above for tables, diagrams and the full file.
O LEVEL M2-R5.1 CHAPTER-6 JavaScript and Angular JS Special Edition for Exam Preparation 100% Exam-Oriented Questions Most Repeated MCQs from previous exam CHAPTER-6 Javascript and Angular JS
1. Which of the following is a client-side scripting language? · a) JavaScript b) Python c) Java d) C#
2. What is the correct way to add JavaScript in an HTML file?
a <script src="file.js"></script> b <js file="file.js"></js> c <javascript>file.js</javascript> d <link rel="script" href="file.js">
3. Which of the following is a disadvantage of client-side scripting?
a Reduces server load b Runs faster c Cannot access server resources directly d Immediate user feedback
4. How do you declare a variable in JavaScript?
a var x; b int x; c let x; d a and c
5. Which of the following is a valid JavaScript data type?
a Number b String c Boolean d All of the above
6. What is the correct syntax for an if statement in JavaScript?
a if (x > 5) {} b if x > 5 then {} c if x > 5: d if x > 5 {}
7. Which operator is used for strict equality in JavaScript?
8. Which popup box displays a message without user input?
a alert() b prompt() c confirm() d input()
9. Which event occurs when the user clicks on an HTML element?
a onmouseover b onclick c onkeydown d onload
10. What is the scope of a variable declared with var inside a function?
a Global b Local to function c Block d None of the above
11. Which of the following is an advantage of AngularJS?
a Two-way data binding b No MVC support c Difficult to test d Slower performance
12. What is a directive in AngularJS used for?
a To add behavior to HTML elements b To store data c To create new JavaScript functions d None of the above
13. How do you write the first AngularJS program?
a Include angular.js file, create module, create controller, bind data b Only include angular.js file c Use script tag for JS only d Use Node.js
14. Which symbol is used for AngularJS expressions?
15. Which of the following is true about AngularJS services?
a They are reusable components b Cannot be injected into controllers c Only used for styling d Must be written in CSS
16. What is a disadvantage of AngularJS?
a Steep learning curve b Two-way binding c MVC support d Testing is easy
17. Which of the following is used to validate forms in JavaScript?
a document.getElementById() b onsubmit event c innerHTML d alert()
18. Which of these is NOT a JavaScript operator?
19. Which AngularJS concept allows sharing data between controller and view?
a Scope b Module c Filter d Directive
20. How do you call a function named myFunction in JavaScript?
21. What is the output of typeof 42?
a "number" b "string" c "object" d "boolean"
22. What is the correct way to write a JavaScript array?
a var colors = ["red", "green", "blue"]; b var colors = "red", "green", "blue"; c var colors = (red, green, blue); d var colors = {red, green, blue};
23. Which of the following is used to create a function in JavaScript?
a function myFunc() {} b create function myFunc()
{} c def myFunc() {} d func myFunc()
24. What is the correct way to write a JavaScript object?
c var person = ["John", "Doe"]; d var person = "John", "Doe";
25. Which of the following loops is guaranteed to run at least once?
a for b while c d foreach
26. How can you add a comment in JavaScript?
a // This is a comment b <!-- This is a comment --> c /* This is a comment */ d (Both a & c are correct)
27. Which method is used to get an element by its ID?
28. What is the output of 2 + "2" in JavaScript?
a 4 b "22" c NaN d 2
29. Which of the following is a correct way to write an statement?
a else b if x>5 then else c if(x>5): else: d if x>5 {...} otherwise {...}
More chapterwise mcq for M2-R5.1
Try this HTML, CSS and JavaScript live — free
Type any tag or style from these notes into our free editor, press Run and see the page change. The explained examples show the code and the result side by side.
Prepare for O Level with expert guidance
Classroom training, practical labs and exam registration at Zed-King Institute, Kaithal.
