Infosys Certified Node Developer
Practice with real exam-pattern questions for Infosys Certified Node Developer. Each question includes a detailed explanation to help you understand the concept, not just memorise the answer. Try 10 questions free — no login required.
Full question bank for this exam + 1,357+ others. Cancel anytime.
Join Premium10 Infosys Certified Node Developer practice questions with answers
Real Lex exam-pattern multiple-choice questions for the Infosys Certified Node Developer certification. Each question includes the correct answer. The full question bank is available to Premium members.
- Question 1
Find the output of the below code if the file 'app.js' is executed.
file1.js: exports.a = "John"; file2.js: var a = require('./file1'); a.a = "Jack"; app.js: var a = new require('./file1'); var b = require('./file2'); console.log(a.a);- ✓ John Correct
- B Jack
- C Compilation error
- D None of the above
- Question 2
Identify the correct code snippet that successfully create a server in Node.js?
- ✓
var http=require('http');
var server=http.makeServer(function(request,response){
//program logic here
});
server.listen(3000); Correct - B
var http=require('http');
var server=http.newServer(function(request,response){
//program logic here
});
server.listen(8000); - C
var http=require('http');
var server=http.Server(function(request,response){
//program logic here
});
server.listen(8000); - D
var http=require('http');
var server=http.createServer(function(request,response){
//program logic here
});
server.listen(3000);
- ✓
var http=require('http');
- Question 3
Consider the code below.
calculator.js exports.add=function (num1,num2){ return num1+num2; } exports.sub=function (num1,num2){ return num1-num2; } TestCalculator.js var cal=require("./calculator"); Which of the below statements is true with respect to the code in TestCalculator.js file?- ✓ Only add method can be invoked Correct
- B Only sub method can be invoked
- C Both add and sub methods can be invoked
- D Not possible to invoke add and sub methods
- Question 4
What type of applications are not very well suitable to implement using Node.js?
- ✓
Apps with CPU intensive operations
Correct - B
Real Time Chat apps
- C
Data Streaming Apps
- D
Apps with a lot of I/O operations
- ✓
- Question 5
Maria wants to create server in node. She is facing issue with below code at two places X and Y. Please help her with X and Y
let h = require('http') let myserver = X.createServer((req,res)=>{ res.write("Hello World"); res.end(); }) Y.listen(3000,()=>{ console.log("Server started at port 3000") })- ✓
X: h and Y: server
Correct - B
X: http and Y: myserver
- C
X: h and Y: myserver
- D
None of the above
- ✓
- Question 6
What will be the output in the browser for the URL: http://localhost:3000/ ?
const http = require('http'); const server = http.createServer((req, res) => { res.end("hello world"); res.end("hello") }) server.listen(3000);- ✓
Correcthello - B
hello world
hello - C
hello world - D
Code with throw error as res.end() can be used only once
- ✓
- Question 7
What will be the console output of below Node.js code snippet, after running it and tried to access the url "http://localhost:3000/" from browser?
var http=require('http'); var server=http.createServer(function (request, response) { console.log("Request Received"); response.end(); }); server.listen(3000); console.log("Server Running");- ✓
Server Running
Request Received
Request Received Correct - B
Server Running
Request Received - C
Request Received
Server Running - D Request Received
- ✓
Server Running
- Question 8
Consider the code snippet below in an Express server.
app.get('/', function(req, res) { res.send(404); });
What will be the response from server on accessing the path "/"?- ✓ The server will just send the status code and the basic headers, with no body Correct
- B Page Not found
- C Hello World
- D Cannot Get "/"
- Question 9
Web applications commonly have to handle forms in which the user can enter data that need to be processed. Consider the scenario where a login form (login.html)is to be displayed to the user on request. What will be the correct code snippet for implementing this in server.js file in a Node.js application.
- ✓
exports.login=function(url,request,response) {
fs.readFile('./login.html', function (err, html) {
if (err) {
throw err;
}
response.writeHeader(200, {"Content-Type": "text/html"})
response.write(html);
response.end();
});
} Correct - B
exports.login=function(url,request,response) {
fs.write('./login.html', function (err, html) {
if (err) {
throw err;
}
response.writeHeader(200, {"Content-Type": "text/html"});
});
} - C
exports.login=function() {
response.writeHeader(200, {"Content-Type": "text/html"});
response.write(login.html);
response.end();
} - D It is not possible to send an HTML page from node server
- ✓
exports.login=function(url,request,response) {
- Question 10
John wants to run below demo.js file using 'node demo.js' in node environment. Please select the correct output for the below code.
demo.js console.log("Tom"); document.write("Mary");- ✓
Tom Mary
Correct - B
Mary Tom
- C
Mary
- D
Reference Error
- ✓
More in UI
Pay once. Clear every cert this year.
One subscription, full Telegram channel access, every PDF posted during your membership.
- Full access to all 1,357+ certifications
- Monthly updated question banks
- Telegram private channel access
- Cancel anytime
- Everything in Monthly
- Save ₹2,100 vs monthly billing
- Priority answer key requests
- Best for increasing DQ score fast
- Everything in Quarterly
- Lifetime channel access — no renewals
- All future certifications included
- Priority response from admin team
Common questions, straight answers.
A monthly-updated Telegram channel where we post real exam-pattern question banks and detailed answer keys for 1,357+ Infosys Lex certifications. You join once, you get every PDF posted during your membership.
Right after payment on our Graphy page, you'll receive a private invite link to the Telegram channel. Access is instant — usually under 30 seconds.
We compile question banks from the actual Lex test pattern, sourced and verified by 180K+ community members who've recently cleared these exams. Match rate is consistently 85–95%.
Every single month. When Infosys rolls out new versions of certifications, we post updated dumps within 7–10 days. You'll see channel activity weekly.
Clearing certifications is one of the highest-weighted DQ factors. Members typically clear 3–5 certifications in their first 3 months, which moves DQ scores up by a full band.