You are on page 1of 9

Mean Stack-Sample-2

Q.No.1
Node.js is a _________________language.
a. Client Side
b. Server Side
c. Intermediate Side
d. Network Side

Q.No.2
The process by which the browser decides which object to trigger event handler
is________
a. Event Triggering
b. Event Listening
c. Event Handling
d. Event Propagation

Q.No.3
Which of the following statements is false about Node.js
a. I/O operations are non blocking
b. Ideal for synchronous and CPU intensive task
c. Support caching modules
d. Application can be scaled horizontally & vertically

Q.No.4
Inside which HTML element we put the JavaScript Code
a. <js>
b. <script>
c. <javascript>
d. <link>

Q.No.5
In Node.js the ____________class is used to create and consume custom events
a. EventEmitter
b. Events
c. NodeEvent
d. CustomEventHandler

Q.No.6
function constFun()
{
var func=[];
for(var i=0;i<10;i++)
func[i]=function(){ return I;};
return func;
}
var funcs=constFun();
funcs[5]();
a. 9
b. 0
c. 10
d. 12

Q.No.7
How many callback functions can be attached to handle a request in Express
a. Exactly one
b. Two
c. Three
d. Unlimited

Q.No.8
In JavaScript how will you find out which character occurs at 5th position in string
“HelloWorld”?
a. substring()
b. charPos()
c. indexOf()
d. charAt()

Q.No.9
What is(are) the core feature(s) of Express Framework
a. Allows to setup middlewares to respond to http requests
b. Defines a routing table which can work as per the http method an URL
c. Dynamically Render HTML pages
d. All of the above

Q.No.10
What will be the output of the following Javascript code
function totalelements()
{
var allgenders=document.getElementsByName(“gender”);
alert(“Total genders”+allgenders.length);
}
<form>
<input type=”radio” name=”gender” value=”male” />
<input type=”radio” name=”gender” value=”female” />
<input type=”radio” name=”gender” value=”others” />
</form>
a. 3
b. 2
c. 1
d. none of the above.

Q.No.11
Lets say below code is run on node .which of the following is a valid URL for users
to get response as “Hello John”
var express=require(‘express’);
var app=express();
app.get(‘./name’,(req,res)=>res.send(“Hello”+req.params.name));
app.listen(4000);

a. localhost/John
b. localhost:4000/John
c. localhost?name=John
d. localhost:4000?name=John

Q.No.12
$("h1#pqr"). focus(function () {
alert("test");
}); In this code, pqr is
a. element
b. class
c. id
d. all the above.

Q.No.13
Which of the following is the correct syntax to display “Javascript Language” in an
alert box using Javascript?
a. alertbox(“Javascript Language”)
b. msg(“Javascript Language”)
c. msgbox(“Javascript Language”)
d. alert(“Javascript Language”)

Q.No.14
The setTimeOut() function is used to _______________
a. Make the event sleep
b. Register a function to be invoked after a certain time
c. Invoke an event after a certain time
d. Time for iteration

Q.No.15
Which of the following tool is used to debug Node.js application
a. JSLint
b. ESLint
c. EventEmitter
d. Node Inspector

Q.No.16
Given the following Javascript code below what will be the output?
var v1=[1,2,3];
var v2=[4,5,6];
var res=v1.concat(v2);
document.writeln(res);
a. 1,2,3
b. 1,2,3,4,5,6
c. Error
d. 4,5,6
Q.No.17
Predict the output of of below JavaScript Code
let js=”JS programmer”;
console.log(typeof js);
js=10;
console.log(typeof js);

a. number string
b. string number
c. null null
d. string string

Q.No.18
Assume that HTML page has an element
<div id=”myid”>
How can you select this element using jQuery?
a. $(‘myid’)
b. $(‘#myid’)
c. $(‘.myid’)
d. $(‘:myid’)

Q.No.19
Which of the following jQuery syntax is used to select all the <p> elements with
class ‘red’?
a. $(‘p#red’)
b. $(‘p.red’)
c. $(‘p.first’)
d. $(‘p$red’)

Q.No.20
NodeJs features are
a. Single Threaded
b. Non Blocking
c. Asychronous
d. All the above.
Q.No.21
Where can we put the JavaScript code inside an HTML page
a.In <HEAD> section
b. In <BODY> section
c. In both head and body section
d. None javascript code can only exist in external file

Q.No.22
Which of the following is true about EventEmitter on property
a. on property is used to fire event
b. on property is used to bind a function with the event
c. on property is used to locate an event handler.
d. None of the above.

Q.No.23
Which of the following is a valid syntax to refer external javascript in HTML file
a. <script src=’test.js’>
b. <script href=’test.js’>
c. <script name=’test.js’>
d. <script dest=’test.js’>

Q.No.24
Which jQuery function is used to prevent code from running,before the document
is finished loading?
a. $(document).load()
b. $(document).ready()
c. $(body).onload()
d. $(body).ready()

Q.No.25
What are the methods used to provide effects in jQuery
a. show()
b. hide()
c. toggle()
d.All of the above.

Q.No.26
setTimeOut() function belongs to which javascript object
a. Window
b. Navigator
c. Element
d. History

Q.No.27
What is the correct syntax to write an Angular Expression?
a. {{expression}}
b. [expression]
c. {expression}
d. [[expression]]

Q.No. 28
Which of the following method in jQuery is used to hide the selected elements?
a. hidden()
b. invisible()
c. fade()
d. hide()

Q.No.29
Given HTML code
<select name=’myselect’ id=’myselect’>
<option value=’ih’>Internet</option>
<option value=’js’>Javascript</option>
<option value=’vs’>VB</option>
<option value=’as’>ASP</option>
</select>
Which of the following is the correct code for retrieving the index of the selected
option in this dropdown list using Javascript?
a. var x=document.getElementByTagName(‘select’)
b. var x=document.getElementsById(‘myselect’)
c. var x=document.getElementById(‘myselect’)
d. None of these

Q.No.30
How many $RouteScope an Angular application can have?
a. 0
b. 1
c. 2
d.infinity

Q.No.31
Which of the following is a unit testing framework for Angular Application
a. Jasmine
b. karma
c.Protractor
d. All of these

Q.No.32
__________is a command line tool that installs,updates or uninstalls Nodejs
Packages in your application.
a. package-manager
b. NPM
c. REPL
d. package-installer

Q.No.33
What is the default ECMAScript target version given by –t parameter of tsc
compiler?
a. ES3
b. ES6
c. ES2015
d. ES2016

Q. No34
Which sign is used as prefix for the built-in objects in AngularJS?
a. #
b. @
c. %
d. $

Q.No.35
Where can you define child URL routes in Angular Application?
a. In the routes array
b. In the component
c. In the html element
d.In the URI

Q.No.36
In Angular ,which decorator is used to configure your module class?
a. @NgModule
b. @NgConfigure
c. @NgApp
d. @NgAngular

Q.No.37
Which of the following can be used to convert javascript object into a string?
a. JSON.parse()
b. JSON.stringfy()
c. JSON.Null()
d. JSON.Objectify()
Q.No.38
As the web app architecture is concerned which type(s) of testing is(are) used as
integration test?
a. Component testing
b. Content Testing
c. Navigation testing
d. Both a and c.

Q.No.39
Where can we place the styles that are only used by a single component in
angular.
a. In the global styles.css
b. In the app.component.css
c. In the module
d. In the HTML file
Q.No 40.
In Angular which decorator is used to create your own custom defined pipes?
a. @Pipe
b. @Piped
c. @PipeModule
d. @PipeDemo

You might also like