Javascript and Angular Js important MCQs in English/Hindi | Nielit Notes | PDF

In this post, we cover all important Questions from the topic "Javascript and Angular Js".

These MCQs will definitely help to pass IT and Computer students in any exam and interview that have Javascript and Angular Js topic.

The Javascript and Angular Js chapter covers the following topics:

1. Introduction to Client Side Scripting Language.

2. Variables in Java Script.

3. Operators in JS.

4. Conditions Statements.

5. JS Popup Boxes.

6. JS Events.

7. Basic Form Validations in JavaScript.

After completion of the Javascript and Angular Js unit, Students are expected to be able to do the following tasks:

  • Apply client-side scripting.
  • Adding Validations checks on forms (webpages).


Javascript and Angular Js MCQs

Here are the 65 most important and frequently asked MCQs from the  "Javascript and Angular Js" topic.


1. Live wire javascript is also called _________side javascript.
a) client                      
b) Server        
c) Website     
d) Live wire
Ans. b


2. Which of the following community Angular JS belong to?
a) Twitter
b) Facebook
c) Google
d) Microsoft
Ans. a


3. What will be the output of the following JavaScript code?
int x=0;
for(x;x<10;x++);
console.log(x);
a) 0 
b) 9
c) 10 
d) Error 
Ans.c) 10


4. How many $RootScope an AngularJS application can have?
a) Zero
b) One
c) Two
d) Infinity
Ans. b


5. Which of the following components can be injected as a dependency in AngularJS?
a) Value
b) Factory
c) Constant
d) Application Module
Ans.d

 
6. Multiple declarations of variables are separated by which symbol.
a) Semicolon
b) Colon 
c) Comma
d) Asterisk
Ans.c) Comma


7. AngularJS applications are a mix of which of the following technologies?
a) HTML and PHP
b) HTML and JavaScript
c) HTML and TypeScript
d) PHP and JavaScript
Ans. b


8. Which of the following template can be used to write AngularJS directives?
a) Tag
b) Attribute
c) Class name
d) All of the above
Ans.d
 

9. _______class provide an interface for invoking javascript methods and examining javascript properties.
a) JSobject   
b) javascript file       
c) jquary         
d) java wrapper
Ans. a



10. Which of these is not a logical operator?
a) ! 
b) &
c) && 
d) ||
Ans.b) &
 

11. Navigator javascript is also called _______side javascript.
a) client                      
b) Server        
c) Website     
d) Live wire
Ans. a

 
12. Predict the output of the following JavaScript code.
<script type=”text/javascript” language=”javascript”>
var x=5;
var y=6;
var res=eval(“x*y”)
document.write(res);
</script>
a) “30” 
b) 30
c) 5*6 
d) “5*6”
Ans.b) 30
 

13. javascript is an ________scripting language.
a) object-oriented     
b) client-oriented      
c) network oriented  
d) server-oriented
Ans. a


14. File Upload is the _____ side javascript object.
a) client                      
b) Server        
c) Website     
d) Live wire
Ans. a


15. Which of the following directives is used to start an angularJS application?
a) ng-repeat
b) ng-init
c) ng-app
d) ng-model
Ans. c


16. javascript is interpreted by ______.
a) client                      
b) Server        
c) Website     
d) Live wire
Ans. a


17.Which of the following is the correct syntax to display “enter password” in
an alert box using JavaScript?
a) alertbox(“enter password”); 
b) msg(“enter password”);
c) msgbox(“enter password”); 
d) alert(“enter password”);
Ans.d)


18. Which of the following scoping type does JavaScript use?
a) Sequential
b) Segmental
c) Lexical
d) Literal
Ans.c) Lexical


19. ____ tag can handle mouse events in Netscape.
a) <a>             
b) <onclick>  
c) <net>          
d) <control>
Ans. a


20. Javascript variables are ______ typed.
a) statically               
b) strongly                
c) dynamically         
d) globally
Ans. c


21. _________attribute can hold the javascript version.
a) var              
b) language              
c) type                        
d) script
Ans. b


22. In JavaScript, Window.prompt() method return true or false value ?
a) False
b) True
Ans. a)


23. When a javascript object is sent to java, the runtime engine creates a java wrapper of type_______.
a) JSobject    
b) javascript file       
c) jquary         
d) java wrapper
Ans. a


24. Which of the following type of variable everywhere in your JavaScript code?
a) Global variable
b) Local variable
c) Both (a) and (b)
d) None of the above 
Ans.a) Global variable


25. Which of the following attribute is used to include external js code inside
your html document?
a) Src
b) Ext 
c) Script
d) Link 
Ans.a) Src


26. ++ operator in javascript is ____ Operator.
a) Unary         
b) Positive     
c) Increment  
d) Addition
Ans. a


27. ________side image maps can be used with javascript.
a) client                      
b) Server        
c) Website     
d) Live wire
Ans. a


28. Which of the following is used to share data between controller and view in AngularJS?
a) using Model
b) using services
c) using factory
d) using $scope
Ans. b
 

29. Design concepts of Javascript language were taken from_______ .
a) C & C#
b) COBOL & ADA
c) BASIC & FORTRAN
d) Self & Scheme
Ans. d


30. Choose the client-side JavaScript object:
a) Database
b) Cursor
c) Client
d) FileUpLoad
Ans. d)FileUpLoad


31. JavaScript runs was developed by_______.
a) Netscape Communications
b) Microsoft corporation
c) Sun Microsystems
d) Oracle
Ans. a

 
32. What is the correct JavaScript to write “Hello World”?
a) System.out.println(“Hello World”)
b) println (“Hello World”)
c) document.write(“Hello World”)
d) response.write(“Hello World”)
Ans.c)
 

33. Javascript language supports ______concepts of programming.
a) object oriented    
b) procedural           
c) imperative/functional     
d) all of them
Ans. c


34. Javascript complies with______ standard)
a) Indian
b) British
c) ASCII
d) ECMA-262 & ISO/IEC 16262
Ans. d


35. Which of the following is an advantage of AngularJS?
a) Uses dependency injection and makes use of separation of concerns
b) Code is unit-testable
c) Provides reusable components
d) All of the mentioned
Ans.d
 

36. _______statement in JavaScript helps to evaluate any mathematical string at runtime.
a) value        
b) eval           
c) calc           
d) cal
Ans. b


37. While using the factory method, we must first define a factory and then assign a method to it.
a) True
b) False
Ans. a


38. AngularJS supports two-way data binding.
a) True
b) False
Ans. a


39. Javascript language is identified by the parameter language=______ .
a) "javascript"           
b) "vbscript"              
c) "vba"         
d) "java"
Ans. a


40. Which of the following components can be injected as a dependency in AngularJS?
a) factory
b) service
c) value
d) All of the above
Ans.d


41. NaN stands for_________.
a) Nano                      
b) NanTech   
c) Not  a number      
d) New attactedNematic
Ans. c


42. Which of the following is true about the AngularJS service?
a) Services are JavaScript functions.
b) Services are responsible to do specific tasks only
c) Inbuilt services are always prefixed with the $ symbol.
d) All of the above.
Ans.d


43. Method is a function bound to_______.
a) a procedure        
b) a library               
c) a script     
d) an object
Ans. d


44. What is the correct syntax
a) <script href=”abc)js”>
b) <script scr=”abc)js’> 
c) <script name=”abc)js”>
d) <script src=”abc)js”>
Ans.d)


45. In JavaScript, _______ is used for single line comments.
a) {...} 
b) // ...            
c) # ... #         
d) $ ... $
Ans. b

 
46. Which of the following can be used as a prefix for Directive?
a) data-
b) ng-
c) All of the mentioned
d) None of the mentioned
Ans. c


47._____ event gets activated when an error occurs during execution of script.
a) onfocus    
b) onblur      
c) onclick      
d) onerror
Ans. d


48. ______event gets activated when a key is pressed)
a) onkeydown         
b) onkeyup   
c) onkeypress          
d) onmouseover
Ans. c


49. What is mean by “this” keyword in javascript?
a) It refers current object
b) It referes previous object
c) It is variable which contains value
d) None of the above
Ans. a)


50. The script tag must be placed in
a) head
b) head and body
c) title and head
d) All of the mentioned
Ans. b)head and body


51. JavaScript is ideal to
a) make computations in HTML simpler
b) minimize storage requirements on the web server
c) increase the download time for the client
d) None of the mentioned
Ans. b)


52. What is JavaScript?
a) JavaScript is a scripting language used to make the website interactive
b) JavaScript is an assembly language used to make the website interactive
c) JavaScript is a compiled language used to make the website interactive
d) None of the mentioned
Ans. a)


53. Javascript code is written within _______ tags.
a) <html> ::: < =html >
b) <body> ::: < =body >
c) <script> ::: < /script >
d) <table> ::: < =table >
Ans. c


54. Which of the following is not considered a JavaScript operator?
a) new
b) this
c) delete
d) typeof
Ans. b) this


55. In JavaScript, ________ is used for multiline comments.
a) /* ... */        
b) {…..}          
c) # ... #         
d) $ ... $
Ans. a


56. Which of the following statement is correct for AngularJS?
a) AngularJS is an HTML framework
b) AngularJS is a Java framework
c) AngularJS is a JavaScript framework
d) AngularJS is a SQL framework
Ans.c)


57. File is ________side javascript object.
a) client                      
b) Server        
c) Website     
d) Live wire
Ans. b


58. On which of the Architectural pattern AngularJS is based?
a) Observer Pattern
b) Decorator pattern
c) MVC Architecture pattern
d) MVVM Architectural pattern
Ans. d)


59. Storing numbers, dates or other values are ______ used for in javascript program.
a) String         
b) Codes        
c) Variables               
d) Functions
Ans. c


60. AngularJS is perfect for?
a) SPAs
b) MPAs
c) DPAs
d) CPAs
Ans.a 


61. Which of the following is the correct syntax for writing AngularJS expressions?
a) (expression)
b) {{expression}}
c) {{{expression}}}
d) [expression]
Ans.b


62. When a user views a page containing a javascript program, which machine actually executes the script?
a) The user’s machine running offline                
b) The user’s machine running  a web browser           
c) The user’s machine running on a website     
d) The users cookies used by a website
Ans. b


63. Which of the following is not a valid AngularJS filter?
a) lowercase
b) orderby
c) email
d) currency
Ans. c


64. Who is known as the father of AngularJS?
a) Brad Green
b) Misko Hevery
c) Adam Abrons
d) Mike Adams
Ans.b


65. Is AngularJS completely based on HTML and JavaScript?
a) Yes
b) No
Ans. a

No comments:

Powered by Blogger.