Wednesday , November 18 2026
Breaking News

JavaScript Programming Professional Certification Exam Answers 2026 (All 100 Questions)

JavaScript Programming Professional Certification exam answers 2026: This page lists all 100 questions of the official JavaScript Programming Professional Certification exam by Itronix Solutions, each with its four answer options and the correct answer highlighted in green. Use it to revise every topic before you attempt the test and earn your verifiable certificate.

About this certification: Test your JavaScript fundamentals: variables, data types, functions, arrays, DOM, events, promises and ES6 features.

Certification JavaScript Programming Professional Certification
Provider Itronix Solutions
Category Programming & Development
Total questions 100 multiple-choice questions
Marks 1 mark per question (100 marks)
Passing score 80% (80 out of 100)
Retake Available if you do not pass
Certificate Verifiable online certificate

Take the exam: JavaScript Programming Professional Certification on Itronix Solutions. See every other Itronix exam in our complete list of Itronix certification answers.

JavaScript Programming Exam Questions and Answers

Questions 1 to 25

1. Which keyword declares a block-scoped variable that can be reassigned?

A. let ✔
B. const
C. var
D. static

Correct answer: A. let

2. What does typeof null return in JavaScript?

A. undefined
B. null
C. number
D. object ✔

Correct answer: D. object

3. Which operator checks both value and type equality?

A. ==
B. !=
C. =
D. === ✔

Correct answer: D. ===

4. Which method adds an element to the end of an array?

A. pop()
B. slice()
C. shift()
D. push() ✔

Correct answer: D. push()

5. What is the output of 2 + ‘2’ in JavaScript?

A. 22 ✔
B. NaN
C. Error
D. 4

Correct answer: A. 22

6. Which function selects the first element matching a CSS selector?

A. document.pick()
B. window.find()
C. document.querySelector() ✔
D. document.getAll()

Correct answer: C. document.querySelector()

7. Arrow functions were introduced in:

A. ES5
B. HTML5
C. ES6 (ES2015) ✔
D. ES3

Correct answer: C. ES6 (ES2015)

8. Which method converts a JSON string into a JavaScript object?

A. JSON.toObject()
B. JSON.parse() ✔
C. Object.json()
D. JSON.stringify()

Correct answer: B. JSON.parse()

9. A Promise in JavaScript represents:

A. A loop
B. A database
C. The eventual result of an asynchronous operation ✔
D. A CSS rule

Correct answer: C. The eventual result of an asynchronous operation

10. Which keyword pauses an async function until a Promise settles?

A. await ✔
B. wait
C. yield only
D. pause

Correct answer: A. await

11. Which array method creates a new array by transforming each element?

A. push()
B. join()
C. map() ✔
D. forEach()

Correct answer: C. map()

12. What does the filter() method return?

A. A boolean
B. A single value
C. A new array with elements that pass a test ✔
D. The original array modified

Correct answer: C. A new array with elements that pass a test

13. How do you write a single-line comment in JavaScript?

A. <!– comment –>
B. ** comment
C. # comment
D. // comment ✔

Correct answer: D. // comment

14. Which event fires when a user clicks an element?

A. onhover
B. submit only
C. click ✔
D. keypress

Correct answer: C. click

15. What is the value of a declared but unassigned variable?

A. undefined ✔
B. 0
C. null
D. empty string

Correct answer: A. undefined

16. Template literals are written using:

A. Double quotes
B. Backticks ✔
C. Single quotes
D. Brackets

Correct answer: B. Backticks

17. Which method is used to attach an event handler to an element?

A. attachHandler()
B. onEvent()
C. addEventListener() ✔
D. listen()

Correct answer: C. addEventListener()

18. What does NaN stand for?

A. New array Name
B. Negative Number
C. Null and Nothing
D. Not a Number ✔

Correct answer: D. Not a Number

19. Which statement is used to exit a loop immediately?

A. break ✔
B. exit
C. return only
D. stop

Correct answer: A. break

20. localStorage data in a browser:

A. Can store only numbers
B. Persists until it is explicitly cleared ✔
C. Is deleted when the tab closes
D. Is stored on the server

Correct answer: B. Persists until it is explicitly cleared

21. JavaScript is mainly used to:

A. Store databases only
B. Add interactivity to web pages and build applications ✔
C. Design logos
D. Style pages only

Correct answer: B. Add interactivity to web pages and build applications

22. JavaScript runs in browsers and also on servers using:

A. Java
B. Node.js ✔
C. PHP only
D. Python

Correct answer: B. Node.js

23. Which keyword declares a block-scoped variable that can be reassigned?

A. let ✔
B. const
C. var
D. static

Correct answer: A. let

24. Which keyword declares a block-scoped constant binding?

A. const ✔
B. let
C. final
D. var

Correct answer: A. const

25. var declarations are:

A. Constants
B. Private
C. Block-scoped
D. Function-scoped and hoisted ✔

Correct answer: D. Function-scoped and hoisted

Questions 26 to 50

26. typeof "hello" returns:

A. "object"
B. "char"
C. "string" ✔
D. "text"

Correct answer: C. "string"

27. typeof null returns:

A. "null"
B. "object" ✔
C. "number"
D. "undefined"

Correct answer: B. "object"

28. undefined means:

A. An intentional empty value
B. A variable has been declared but not assigned a value ✔
C. An error
D. Zero

Correct answer: B. A variable has been declared but not assigned a value

29. null represents:

A. An empty string always
B. An undeclared variable
C. An error
D. An intentional absence of a value ✔

Correct answer: D. An intentional absence of a value

30. The strict equality operator is:

A. =
B. === ✔
C. !=
D. ==

Correct answer: B. ===

31. "5" == 5 evaluates to:

A. undefined
B. An error
C. true ✔
D. false

Correct answer: C. true

32. "5" === 5 evaluates to:

A. undefined
B. An error
C. false ✔
D. true

Correct answer: C. false

33. NaN stands for:

A. Null and Nothing
B. Not a Number ✔
C. New and Null
D. No Assigned Name

Correct answer: B. Not a Number

34. Array.push() adds an element:

A. To the end of an array ✔
B. To the start
C. In the middle
D. Nowhere

Correct answer: A. To the end of an array

35. Array.pop() removes:

A. A random element
B. The last element ✔
C. All elements
D. The first element

Correct answer: B. The last element

36. Array.shift() removes:

A. All elements
B. Duplicates
C. The first element ✔
D. The last element

Correct answer: C. The first element

37. Array.map() returns:

A. The same array mutated always
B. A new array with each element transformed ✔
C. A boolean
D. A single value

Correct answer: B. A new array with each element transformed

38. Array.filter() returns:

A. A string
B. The original array always
C. A single value
D. A new array with elements that pass a test ✔

Correct answer: D. A new array with elements that pass a test

39. Array.reduce() is used to:

A. Reduce an array to a single value ✔
B. Sort an array
C. Remove duplicates only
D. Reverse an array

Correct answer: A. Reduce an array to a single value

40. Array.find() returns:

A. The first element matching a condition ✔
B. A boolean
C. All matches
D. The index always

Correct answer: A. The first element matching a condition

41. Array.includes() returns:

A. A new array
B. Whether an array contains a value ✔
C. The array length
D. The index of a value

Correct answer: B. Whether an array contains a value

42. Object properties can be accessed using:

A. Only parentheses
B. Only colons
C. Only brackets
D. Dot notation or bracket notation ✔

Correct answer: D. Dot notation or bracket notation

43. JSON stands for:

A. JavaScript Object Notation ✔
B. Joined Script Object Name
C. Java Standard Output Network
D. JavaScript Online Node

Correct answer: A. JavaScript Object Notation

44. JSON.parse() converts:

A. A JSON string into a JavaScript value ✔
B. An object into a string
C. A number into text
D. HTML into JSON

Correct answer: A. A JSON string into a JavaScript value

45. JSON.stringify() converts:

A. A JavaScript value into a JSON string ✔
B. A string into an object
C. An array into a number
D. HTML into CSS

Correct answer: A. A JavaScript value into a JSON string

46. An arrow function is written as:

A. (a, b) => a + b ✔
B. a, b -> a + b
C. lambda a, b: a + b
D. function => (a, b)

Correct answer: A. (a, b) => a + b

47. Template literals use:

A. Double quotes only
B. Backticks and ${} for interpolation ✔
C. Hash symbols
D. Single quotes only

Correct answer: B. Backticks and ${} for interpolation

48. The spread operator … can:

A. Expand arrays or objects into elements ✔
B. Delete arrays
C. Create loops
D. Define classes only

Correct answer: A. Expand arrays or objects into elements

49. Destructuring allows:

A. Extracting values from arrays or objects into variables ✔
B. Deleting variables
C. Sorting arrays
D. Encrypting objects

Correct answer: A. Extracting values from arrays or objects into variables

50. A closure is:

A. A closed browser tab
B. A function that remembers variables from its outer scope ✔
C. An error type
D. A loop end

Correct answer: B. A function that remembers variables from its outer scope

Questions 51 to 75

51. Hoisting means:

A. Code runs twice
B. Declarations are moved to the top of their scope during compilation ✔
C. Functions are async
D. Variables are deleted

Correct answer: B. Declarations are moved to the top of their scope during compilation

52. The this keyword refers to:

A. The previous function
B. Always the window object
C. A global constant
D. The object that is executing the current function (context-dependent) ✔

Correct answer: D. The object that is executing the current function (context-dependent)

53. Arrow functions differ by:

A. Having their own arguments object
B. Not having their own this binding ✔
C. Being hoisted fully
D. Always being async

Correct answer: B. Not having their own this binding

54. The DOM is:

A. A database
B. A server
C. A tree representation of the web page that scripts can manipulate ✔
D. A CSS file

Correct answer: C. A tree representation of the web page that scripts can manipulate

55. document.getElementById() returns:

A. A CSS rule
B. The page title
C. The element with the specified ID ✔
D. All elements with a class

Correct answer: C. The element with the specified ID

56. document.querySelector() returns:

A. The first element matching a CSS selector ✔
B. A string
C. The body only
D. All matching elements

Correct answer: A. The first element matching a CSS selector

57. addEventListener() is used to:

A. Send email
B. Remove elements
C. Attach an event handler to an element ✔
D. Create CSS

Correct answer: C. Attach an event handler to an element

58. event.preventDefault() is used to:

A. Stop the browser’s default action for an event ✔
B. Reload the page
C. Stop all JavaScript
D. Delete the element

Correct answer: A. Stop the browser’s default action for an event

59. Event bubbling means:

A. Events are cancelled
B. Events go to children first only
C. Events repeat forever
D. Events propagate from the target up through ancestors ✔

Correct answer: D. Events propagate from the target up through ancestors

60. innerHTML sets or gets:

A. Only attributes
B. The page URL
C. Only CSS
D. The HTML content inside an element ✔

Correct answer: D. The HTML content inside an element

61. textContent is safer than innerHTML for user input because:

A. It adds styles
B. It encrypts text
C. It is faster always
D. It does not parse HTML, reducing XSS risk ✔

Correct answer: D. It does not parse HTML, reducing XSS risk

62. Array.slice() returns:

A. A sorted array
B. A shallow copy of a portion of an array ✔
C. The deleted elements
D. A string

Correct answer: B. A shallow copy of a portion of an array

63. String.trim() removes:

A. The first character
B. Whitespace from both ends of a string ✔
C. Numbers
D. All vowels

Correct answer: B. Whitespace from both ends of a string

64. JavaScript is single-threaded and uses:

A. No concurrency
B. Multiple threads by default for all code
C. Only blocking calls
D. An event loop for asynchronous operations ✔

Correct answer: D. An event loop for asynchronous operations

65. setTimeout() is used to:

A. Run a function after a delay ✔
B. Stop the page
C. Repeat a function forever
D. Load CSS

Correct answer: A. Run a function after a delay

66. setInterval() is used to:

A. Run once only
B. Run a function repeatedly at intervals ✔
C. Close the browser
D. Pause the event loop

Correct answer: B. Run a function repeatedly at intervals

67. A Promise represents:

A. A synchronous variable
B. A value that may be available now, later or never ✔
C. An HTML element
D. A CSS rule

Correct answer: B. A value that may be available now, later or never

68. A Promise can be in states:

A. Pending, fulfilled or rejected ✔
B. Start, run or stop
C. True or false only
D. Open, closed or locked

Correct answer: A. Pending, fulfilled or rejected

69. async/await is used to:

A. Create classes
B. Define constants
C. Style elements
D. Write asynchronous code that reads like synchronous code ✔

Correct answer: D. Write asynchronous code that reads like synchronous code

70. await can be used:

A. Only in CSS
B. Inside async functions (and top-level in modules) ✔
C. Anywhere in old scripts
D. Only in loops

Correct answer: B. Inside async functions (and top-level in modules)

71. fetch() is used to:

A. Store variables
B. Create DOM elements
C. Make HTTP requests ✔
D. Read local CSS

Correct answer: C. Make HTTP requests

72. try…catch is used to:

A. Create loops
B. Handle errors ✔
C. Define objects
D. Import modules

Correct answer: B. Handle errors

73. ES6 modules use:

A. require only
B. import and export ✔
C. using
D. include

Correct answer: B. import and export

74. A class in JavaScript is:

A. A CSS class
B. A variable type
C. Syntactic sugar over prototype-based inheritance ✔
D. A database table

Correct answer: C. Syntactic sugar over prototype-based inheritance

75. JavaScript inheritance is based on:

A. Prototypes ✔
B. Templates
C. Only classes like Java
D. Interfaces

Correct answer: A. Prototypes

Questions 76 to 100

76. The constructor method in a class:

A. Destroys objects
B. Initialises new objects ✔
C. Exports modules
D. Handles events

Correct answer: B. Initialises new objects

77. Optional chaining (?.) allows:

A. Importing files
B. Declaring constants
C. Creating loops
D. Safely accessing nested properties that may be null or undefined ✔

Correct answer: D. Safely accessing nested properties that may be null or undefined

78. Nullish coalescing (??) returns the right side when the left is:

A. A number
B. null or undefined ✔
C. Always
D. Any falsy value

Correct answer: B. null or undefined

79. Truthy values include:

A. 0
B. empty string
C. null
D. Non-empty strings and non-zero numbers ✔

Correct answer: D. Non-empty strings and non-zero numbers

80. Falsy values include:

A. "0"
B. 0, empty string, null, undefined, NaN and false ✔
C. []
D. {}

Correct answer: B. 0, empty string, null, undefined, NaN and false

81. Array.forEach() is used to:

A. Find one element
B. Filter elements
C. Return a new array
D. Execute a function for each element ✔

Correct answer: D. Execute a function for each element

82. Set in JavaScript stores:

A. Duplicates
B. Key-value pairs only
C. Only strings
D. Unique values ✔

Correct answer: D. Unique values

83. Map in JavaScript stores:

A. Only unique values
B. Key-value pairs with keys of any type ✔
C. Only numbers
D. Only strings

Correct answer: B. Key-value pairs with keys of any type

84. console.log() is used to:

A. Send email
B. Print messages to the browser console ✔
C. Save files
D. Display alerts

Correct answer: B. Print messages to the browser console

85. Strict mode ("use strict") helps by:

A. Catching common coding mistakes and unsafe actions ✔
B. Making code faster always
C. Removing variables
D. Disabling errors

Correct answer: A. Catching common coding mistakes and unsafe actions

86. npm is:

A. A CSS framework
B. A browser
C. A database
D. The package manager for Node.js ✔

Correct answer: D. The package manager for Node.js

87. Bundlers like Webpack or Vite are used to:

A. Bundle and optimise modules for the browser ✔
B. Design images
C. Send emails
D. Host databases

Correct answer: A. Bundle and optimise modules for the browser

88. TypeScript adds:

A. A database
B. Static types to JavaScript ✔
C. CSS variables
D. A new browser

Correct answer: B. Static types to JavaScript

89. Debouncing is used to:

A. Encrypt data
B. Speed up loops
C. Limit how often a function runs during rapid events ✔
D. Delete events

Correct answer: C. Limit how often a function runs during rapid events

90. CORS controls:

A. Font loading only
B. Which origins can access resources from a server ✔
C. CSS ordering
D. Code compilation

Correct answer: B. Which origins can access resources from a server

91. XSS can be reduced by:

A. Escaping or sanitising untrusted output ✔
B. Using innerHTML for all user input
C. Disabling HTTPS
D. Removing validation

Correct answer: A. Escaping or sanitising untrusted output

92. Frameworks such as React, Angular and Vue help to:

A. Store files
B. Manage servers only
C. Design logos
D. Build complex user interfaces ✔

Correct answer: D. Build complex user interfaces

93. Array.sort() without a compare function sorts:

A. Elements as strings ✔
B. Randomly
C. Numbers numerically always
D. Not at all

Correct answer: A. Elements as strings

94. The === operator checks:

A. Value and type equality ✔
B. Only type
C. Reference to window
D. Only value

Correct answer: A. Value and type equality

95. JavaScript was created by:

A. Guido van Rossum
B. James Gosling
C. Tim Berners-Lee
D. Brendan Eich ✔

Correct answer: D. Brendan Eich

96. ECMAScript is:

A. A CSS framework
B. A JavaScript library
C. The standard specification that JavaScript implements ✔
D. A browser

Correct answer: C. The standard specification that JavaScript implements

97. The main role of JavaScript on the web is to:

A. Replace HTML
B. Store passwords
C. Replace servers
D. Make pages dynamic and interactive ✔

Correct answer: D. Make pages dynamic and interactive

98. String.split() returns:

A. A number
B. A single string
C. A boolean
D. An array of substrings ✔

Correct answer: D. An array of substrings

99. Array.length gives:

A. The memory size
B. The last element
C. The first index
D. The number of elements in an array ✔

Correct answer: D. The number of elements in an array

100. parseInt("42px") returns:

A. 42 ✔
B. NaN always
C. 0
D. "42px"

Correct answer: A. 42

How to Pass the JavaScript Programming Exam

  • Read every question carefully; most options look similar, so look for the most precise answer.
  • Revise the questions above topic by topic rather than memorising letters, because option order can change in the live test.
  • You need 80 correct answers out of 100 to pass, so aim to understand at least 85 to stay safe.
  • If you do not clear it on the first attempt, review the questions you missed and use the retake option.

Frequently Asked Questions

How many questions are in the JavaScript Programming Professional Certification exam?

The exam has 100 multiple-choice questions, each worth 1 mark.

What is the passing score for the JavaScript Programming Professional Certification?

You need at least 80% (80 out of 100) to pass and receive the certificate.

Can I retake the JavaScript Programming Professional Certification exam?

Yes. If you score below 80%, you can retry the test after reviewing the topics.

Is the Itronix certificate verifiable?

Yes. Every certificate issued by Itronix Solutions has a unique ID that can be checked on the Itronix verify-certificate page.

More Programming & Development Certification Answers

Disclaimer: These answers are provided for learning and revision. Questions and answers are checked regularly; if you find a mistake, let us know in the comments.

About Priya Dogra

Priya Dogra runs priyadogra.com, where she shares free certification courses, internships, jobs, scholarships and exam preparation guides for Indian students and freshers. Follow her on YouTube, LinkedIn and Instagram for the latest opportunities.

Check Also

Unix/ Linux Certification exam answers 2026

Unix/ Linux Certification Exam Answers 2026 (All 100 Questions)

All 100 Unix/ Linux Certification exam questions with correct answers highlighted - updated 2026.

Leave a Reply

Your email address will not be published. Required fields are marked *