Online Exam Quiz

questionQuestion  1 to 30

What is the output of console.log(5 * '5')?

  • '25'
  • 25
  • 55
  • TypeError
Mark for review

What does the typeof operator return when used with an array?

  • object
  • array
  • list
  • number
Mark for review

What is the output of console.log(+'5')?

  • 5
  • '5'
  • NaN
  • TypeError
Mark for review

What is the result of console.log(!'hello')?

  • TRUE
  • FALSE
  • TypeError
  • undefined
Mark for review

What is the output of console.log(5 + true)?

  • 6
  • 5true
  • 1
  • TypeError
Mark for review

What does the forEach() method do in JavaScript?

  • Executes a function once for each array element
  • Returns a new array with elements that pass a test
  • Reverses the elements of an array
  • Joins two or more arrays
Mark for review

Which function is used to execute a function after a specified number of milliseconds in JavaScript?

  • setDelay()
  • setTimeout()
  • delay()
  • wait()
Mark for review

Which of the following is not a looping structure in JavaScript?

  • for
  • while
  • loop
  • do...while
Mark for review

What will be the output of console.log('hello'.charAt(0))?

  • 'hello'
  • 'h'
  • 'e'
  • TypeError
Mark for review

Which method is used to execute a function repeatedly at fixed time intervals in JavaScript?

  • setInterval()
  • setTimeout()
  • wait()
  • delay()
Mark for review

What is the result of console.log(1 + 2 + '3')?

  • 6
  • '123'
  • '33'
  • TypeError
Mark for review

Which of the following is not a valid JavaScript event handler?

  • onclick
  • onhover
  • onchange
  • onkeydown
Mark for review

What is the result of 3 === '3'?

  • TRUE
  • FALSE
  • Error
  • NaN
Mark for review

What will be the output of console.log(2 * 'two')?

  • 2
  • 'two'
  • NaN
  • TypeError
Mark for review

What will be the output of console.log(2 + '2')?

  • 4
  • '22'
  • '4'
  • NaN
Mark for review

What is the purpose of the break statement in JavaScript?

  • To exit a loop
  • To skip the current iteration of a loop
  • To continue to the next iteration of a loop
  • To halt the execution of a function
Mark for review

Which function is used to find the maximum value in an array in JavaScript?

  • max()
  • maximum()
  • Math.max()
  • Array.max()
Mark for review

Which of the following is not a valid JavaScript comparison operator?

  • ===
  • !==
  • ==
  • <=>
Mark for review

Which method is used to remove the last element from an array in JavaScript?

  • pop()
  • shift()
  • slice()
  • splice()
Mark for review

What will be the output of console.log('hello'.toUpperCase())?

  • 'hello'
  • 'HELLO'
  • 'h'
  • TypeError
Mark for review

What is the output of console.log('5' - 3)?

  • '53'
  • '2'
  • 2
  • TypeError
Mark for review

What does DOM stand for?

  • Document Object Model
  • Document Order Model
  • Document Organization Model
  • Dynamic Object Manipulation
Mark for review

What does the concat() method do in JavaScript?

  • Joins two or more arrays
  • Splits a string into an array of substrings
  • Reverses the elements of an array
  • Returns the first element of an array
Mark for review

What is the result of console.log(0 == false)?

  • TRUE
  • FALSE
  • Error
  • NaN
Mark for review

What does the term "DOM" stand for in JavaScript?

  • Document Object Model
  • Dynamic Object Manipulation
  • Document Order Model
  • Document Organization Model
Mark for review

Which method is used to add elements to the end of an array in JavaScript?

  • push()
  • pop()
  • shift()
  • unshift()
Mark for review

Which function is used to parse a string to JSON in JavaScript?

  • parse()
  • stringify()
  • toJSON()
  • fromJSON()
Mark for review

What is the result of console.log(Boolean(''))?

  • TRUE
  • FALSE
  • TypeError
  • undefined
Mark for review

Which of the following is not a valid JavaScript data type?

  • String
  • Number
  • Boolean
  • Float
Mark for review

What is the result of console.log(typeof(NaN))?

  • NaN
  • number
  • undefined
  • Error
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review