Which of following tag is used to link Javacript ?
style
link
script
jlink
Answer : C
Explain: script tag is used to link external Javascript.
What is the extension of Javascript file ?
css
jsj
jss
js
Answer : D
Explain: Extension of javascript file is .js
Which of the following is true about AngularJS expressions ?
Expressions behave in same way as ng-bind directives
Expressions are used to bind application data to html
Expressions are written inside double braces like {{expression}}
All of these
Answer : D
Explain: All the point regarding to angularJS is true.
What MVC stands for?
Model View Control
Model Viewpoint Control
Model View Controller
Main View Control
Answer : C
Explain: Angular JS supports MVC, is used for software design.
What is a Model in MVC ?
the lowest level of the pattern responsible for maintaining data
represents server-side data
represents data stored in a database
None of these
Answer : A
Explain: In MVC, Model- is responsible for maintaing the data.
Which is the correct syntax to call an external JavaScript file in the current HTML document ?
<script src=" test.js"></script>
<script href=" test.js"></script>
<import src=" test.js"></import>
<import link=" test.js"></import>
Answer : A
Which statement specify correct difference between var and let keywords in JavaScript ?
var defines a variable while let defines a constant.
There is no such major difference between them.
The value of a variable declared with var can be changed while the value of a variable declared with let cannot be changed.
var defined function scoped variable while let define block scoped variable.
Answer : D
Explain: var and let are both used for variable declaration in javascript but the difference between them is that var is function scoped and let is block scoped.
Which of the following is not a mouse event ?
onclick
onmousescroller
onmouseover
onmousemove
Answer : B
Explain: onmousemove, onmouseover and onclick are mouse event in HTML DOM Event.
The correct syntax to write “Sky is blue” in JavaScript is :
jscript.write(“Sky is blue”)
document.write(“Sky is blue”)
print(“Sky is blue”)
jscript.print(“Sky is blue”)
Answer : B
Explain: document.write("text-here") is correct way to write any text.
Wich of the following way to get element by ID ?
document.getElementByclass
document.getElementByid
document.getElementByTag
None of these
Answer : B
Explain: To get element by id we can use - document.getElementByid("id_name").
Which of the following expressions is true ?
{ expression }
[{ expression }]
{{expression }}
_expression }
Answer : C
Explain: {{ expression } is correct way.
Which directive is used for data binding in AngularJS?
ng-data
ng-app
ng-bind
ng-controller
Answer : C
Explain: ng-bind is used to bind data in AngularJs.
For what purpose Javascript is designed for ?
To style HTML Pages
To perform server-side scripting operation
To execute the query related to DB on server
To add interactivity to HTML Pages
Answer : D
AngularJS is a __________.
HTML Framework
.Net Framework
JavaScript framework
Oracle Framework
Answer : C
Explain: AngularJS is a javascript framework written in Javascript and structural framework use for dynamic web apps.
What is a module in AngularJS ?
expression
application
element
None of above
Answer : B
Explain: An AngularJS module defines an application. The module is a container/box for the different parts of an application.
The script tag must be placed in
head tag only
below title tag
head or body tag
body tag only
Answer : C
Explain: The script tag should either be included between the <head> tags or just before the closing <body> tag in your HTML document.
A module in AngularJS can be created using :
angularjs.module
module.angular
angular.modules
angular.module
Answer : D
Explain: To create a module in AngularJS, we use angular. module("app").
The alert() function in JavaScript is used for :
To display a virtual alert box
To display output on console
To evaluate the expression
Both (A) and (C)
Answer : A
Explain: alert() used to display virtual alet box on the screen.
AngularJS developed by __________ and follows __________ .
Amazon, Model View System
Misko Hevery, Model View Controller
Elon Musk, Model View Data
Bill Gates, Spiral Model
Answer : B
Explain: AngularJS was created in 2009 by Miško Hevery, a developer working at Google and follows MVC.
Which of the following directives are used in AngularJS ?
ng - app
nc - init
Both A and B
None of above
Answer : A
Explain: AngularJS directives are extended HTML attributes with the prefix ng-. So, ng-app is a directive here.