NodeJS Questionnaire Welcome to your NodeJS Questionnaire The questionnaire needs to be completed in 30 minutes. Full Name Email Address English Fluency Assessment > This general assessment has been designed to help us decide what level of fluency you possess in English, which is essential for all communication. I'm from Pune. ____________ is in Maharastra. They It He She Excuse Me. How _________ your last name? K-A-R-A-N Spell you spell do you spell spell you I'd like ________ omelette, please. A __ an two My name's Pete and this is Sylvia. ________ doctors from France. I'm We're She's They're Sorry, ________ Vaibhav. My name's Aman. I isn't I is not I aren't I 'm not I go to work ________ train. With by for in She ________ a dog. not have don't have don't has doesn't have Stephan ________ in our company. Work works is work working ________ they live in London? Are Is Do Does When do you play tennis? ________ Mondays. On In At By What time ________ work? starts he do he starts does he starts does he start ________ two airports in the city. It is There is There are This is ________ at school last week? Do you were Was you Were you You were Brad Pitt is a popular actor but I don't like ________ . him his her them We ________ the film last week. see saw sees were see He ________ tennis with me yesterday. doesn't played didn't played not played didn't play She was born ________ May 6th, 1979. in at on from Where ________ last summer? you went did you went do you went did you go Were you at the shop at 5 p.m. yesterday? No, I ________ . didn't am not wasn't weren't Excuse me, ________ is the T-shirt? It's 699/- what expensive how much how many how price NodeJS Questionnaire > These questions are to assess your knowledge as a NodeJS Developer. What is a controller in MVC? It is a software Code that stores the data It is a software Code that renders the user interface It is a software Code that controls the interactions between the Model and View None of the above Which of the following statements will yield a false result? typeof NaN === "number" NaN === NaN Both of the above statements None of the above statements What will be the result of JSON.parse('{"firstName":"Max", "birth": 1986-12-15, "city":"New York"}') {"firstName":"Max", "birth": 1986-12-15, "city":"New York"} {"firstName":"Max", "birth": "1986-12-15", "city":"New York"} Error None of the above What is the output of the code below? function job() { return new Promise(function(resolve, reject) { reject(); });}let promise = job();promise.then(function() { console.log('Success 1');}).then(function() { console.log('Success 2');}).then(function() { console.log('Success 3');}).catch(function() { console.log('Error 1');}).then(function() {console.log('Success 4');}); Error 1 Success 1 Error 1 Success 1 Success 2 Success 3 Success 4 Success 1 Success 2 Success 3 Error 1 Success 4 Error 1 Success 1 Success 2 Success 3 Success 4 Error 1 Success 4 Which of the following is true about NodeJS? It is synchronous in nature Slower code execution than other similar languages It is single threaded but highly scalable All of the above Which of the following predefined function that returns the character in the string starting at the specified position via the specified number of characters? slice() split() substr() search() In JavaScript what does x===y statement implies? Both x and y are equal in value, type and reference address as well Both are equal in the value and data type Both are x and y are equal in value only Both are not same at all APIs created using NodeJS are Asynchronous Synchronous Depends on how you make them None of above Which of the following is true about RESTful web services Web services based on REST Architecture are known as RESTful web services Webservices can work without using HTTP methods to implement the concept of REST Architecture Both of the above None of above Which of the following statements is/are true about Timer functions(setTimeout(), setImmediate() and setInterval) in NodeJS The Timers module in Node.js contains functions that execute code after a set period of time Timers do not need to be imported via require() Both of the above None of the above What will be the output of console.log("one"<8); True False Which one of the following is correct output for the following code? var obj = { length:20, height:35,}if('breath' in obj === false) { obj.breadth = 12;}console.log(obj.breadth); Error Undefined 12 20 What will be the output of the following code? function getHeightType() { var height = 123.56; var type = (height>=190)?"Taller":"Little short"; return type;}var heightType = getHeightType();console.log(heightType); 123.56 Taller 190 Little short Which command is used to install all the modules in package.json present in the current working directory? npm -i npm init npm start npm install Which HTTP method when used in the method field, leaves entity body empty? POST SEND GET PUT What will be the output of the following code snippet? var p = new Promise((resolve, reject) => { reject(Error('The Fails!'))}).catch(error = > console.log(error.message)).catch(error = > console.log(error.message)) print error message twice process exits print error message once UnhandledPromiseRejectionWarning What will be the output of the following code snippet? Promise.resolve('Success!').then(data => { data.toUpperCase()}).then(data => { console.log(data)}) prints "SUCCESS!" prints `undefined` prints "SUCCESS!" and "SUCCESS!" prints "Success!" Which of following can be used to define route path? regular expressions strings Both of the above None of the above What is Callback? Callback is a technique in which a method call back the caller method Callback is an synchronous equivalent for a function Both of the above None of the above Default scope in NodeJS app is Global Function Local to object Global None of the above The npm ls statement on the terminal window is used to show the list of all the locally installed module True False Which function is used to fire a event of the Built-in "events" module in NodeJS start() fire() startEvent() emit() Which of the following are types of streams in NodeJS? Readable Duplex Transform All of the above Which of the following function in events serve the same purpose as on() function? add() listeners() addListener() once() What is the output of code - var a = [1,2,3,4,5]; var b = a.slice(0,3); return b; Returns [4,5] Returns [1,2,3] Returns [1,2,3,4] Returns [1,2,3,4,5] The primary purpose of the array map() function is that it passes each element of the array and returns the necessary mapped elements passes each element of the array on which it is invoked to the function you specify, and returns an array containing the values returned by that function maps the elements of another array into itself None of the above Which of the following is true about the following statement where a is an array - if(!a[i]) continue; Skips the undefined elements Skips the non existent elements Skips the null elements All of the mentioned If the return statement doesn't have an associated expression It returns the undefined value It will throw an exception It returns the value 0 None of the above What will be the output of the statements - var result = eval("10*10+5"); console.log(result); 10*10+5 105 as string 105 as an integer value Exception Only one callback function can be used to handle a request True False Synchronous and asynchronous both of these types of methods are present in fs module True False To create a chain of route handlers for a route path in express js application, which of the following is used app.router() app.route() Measuring transaction rates app.routing() None of the above Find output of following code ("1 plus 1 is " + 1 + 1); 1 plus 1 is 11 1 plus 1 is 2 1 plus 1 is 1 + 1 2 Using parseInt() to convert a string which is a decimal number Throws an Error Returns decimal values in string form Returns the integer portion of the number None of the above