Infosys Certified JavaScript Professional
Practice with real exam-pattern questions for Infosys Certified JavaScript Professional. 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 JavaScript Professional practice questions with answers
Real Lex exam-pattern multiple-choice questions for the Infosys Certified JavaScript Professional certification. Each question includes the correct answer. The full question bank is available to Premium members.
- Question 1
A JavaScript Developer defined below identifiers, please select the valid identifiers from the given options. [select any 2 options]
- ✓123abcCorrect
- B_myVariable
- Cmy Variable
- Dvar
- Eroll_no
- Question 2
As per the below JavaScript code snippet, predict the output.
let student = { name: "John", rank: "3", course: null } let { rank, course} = student; if (rank !== 3) { if (typeof(course) === null) { console.log("HTML"); } else if (typeof course !== "object") { console.log("CSS"); } else { console.log("JavaScript"); } } else { console.log("Bootstrap"); }- ✓
HTML
Correct - B
CSS
- C
Bootstrap
- D
JavaScript
- ✓
- Question 3
A developer implemented the below function that determines if a given number is positive, negative, or zero. Consider the following code which relies on the ternary operator:
function determineSign(num){ return (num>0)?"Positive":(num<0)?"Negative":"Zero"; } console.log(determineSign(-5)+" and "+determineSign(0)+" and "+determineSign(10))What will be the output of the above code snippet?
- ✓
Zero and Negative and Positive
Correct - B
Negative and Zero and Positive
- C
Positive and Zero and Negative
- D
SyntaxError
- ✓
- Question 4
What will be the console output, when the below JavaScript code is executed?
let myMessage="Hello World!"; let myMessage="Hello JavaScript!"; console.log(myMessage)- ✓
It will throw a SyntaxError
Correct - B
"Hello World!" will be printed in the console
- C
It will print undefined
- D
"Hello JavaScript!" will be printed in the console.
- ✓
- Question 5
A developer is creating a JavaScript function to manage a library system. The function needs to declare variables for the book title, author name, and the number of copies available. Which line of code will cause an error?
function manageLibrary() { //Line 1 let bookTitle = "JavaScript Essentials"; //Line 2 let authorName = "John Doe"; //Line 3 let numberOfCopies = 5; //Line 4 let book-title = bookTitle + " by " + authorName; //Line 5 let totalCopies = numberOfCopies * 2; //Line 6 return book-title + " has " + totalCopies + " copies available."; //Line 7 }- ✓
Line 5
Correct - B
Line 2
- C
Line 4
- D
Line 3
- ✓
- Question 6
Consider the following JavaScript code snippet. What will be the output of the console.log statements?
let user = { name: "Alice", age: 30, isPremiumMember: true, getDetails: function() { return `${this.name} is ${this.age} years old and ${this.isPremiumMember ? "is" : "is not"} a premium member.`; } }; console.log(typeof user.age); console.log(user.getDetails()); console.log(typeof user.getDetails);- ✓
object
Correct
Alice is 30 years old and is a premium member.
string - B
string
Alice is 30 years old and is a premium member.
object - C
number
Alice is 30 years old and is a premium member.
function - D
number
Alice is 30 years old and is not a premium member.
function
- ✓
- Question 7
Predict the output of the following code:
let result = 1; for (let i = 2; i <=3; i++) { for (let j = 2; j <= 3; j++) { if (i === 2 && j === 3) { continue; } result += i + j; } } console.log(result);- ✓
15
Correct - B
16
- C
SyntaxError
- D
21
- ✓
- Question 8
Consider the following JavaScript for loop:
for (var i=0; i< 5; i++) { setTimeout(() => console.log(i), 1000); }What will be the output after 1 second?
- ✓
0 1 2 3 4
Correct - B
0 1 2 3 4 5
- C
undefined
- D
5 5 5 5 5
- ✓
- Question 9
What will be the output of the following code?
let a=10; if(a = 6) { console.log("Executed"); } else { console.log("Not Executed"); }- ✓
Executed
Correct - B
Not Executed
- C
Syntax Error
- D
TypeError
- ✓
- Question 10
What will be the output of the following code?
function scope() { var x = 1; let y = 10; const z = 20; console.log("Initial values:", x, y, z); if (true) { var x = 2; let y = 15; const z = 25; console.log("Inside if block:", x, y, z); } console.log("After if block:", x, y, z); } scope();- ✓
Initial values: 1 10 20
Correct
Inside if block: 1 15 25
After if block: 1 15 25 - B
Initial values: 1 10 20
Inside if block: 2 10 20
After if block: 2 10 20 - C
Initial values: 1 10 20
Inside if block: 2 15 25
After if block: 2 10 20 - D
Initial values: 1 10 20
Inside if block: 1 10 20
After if block: 1 10 20
- ✓
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.