Online Exam Quiz

questionQuestion  1 to 30

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

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

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

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

What does the isNaN() function do in JavaScript?

  • Checks if a value is not a number
  • Checks if a value is a number
  • Checks if a value is negative
  • Checks if a value is infinite
Mark for review

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

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

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

  • TRUE
  • FALSE
  • Error
  • NaN
Mark for review

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

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

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

  • String
  • Number
  • Boolean
  • Float
Mark for review

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

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

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

  • '25'
  • 25
  • 55
  • 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

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

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

What will be the output of console.log(typeof(NaN))?

  • NaN
  • number
  • undefined
  • Error
Mark for review

What is the result of console.log(undefined == null)?

  • TRUE
  • FALSE
  • TypeError
  • undefined
Mark for review

What does the filter() method do in JavaScript?

  • Returns the first element of an array
  • Returns a new array with elements that pass a test
  • Returns the last element of an array
  • Returns a new array with the length of the elements
Mark for review

What does the splice() method do in JavaScript?

  • Adds or removes elements from an array
  • Returns a new array with elements that pass a test
  • Reverses the elements of an array
  • Joins two or more arrays
Mark for review

What will be the output of typeof(null)?

  • object
  • null
  • undefined
  • function
Mark for review

What does the this keyword refer to in JavaScript?

  • Global object
  • Current object
  • Parent object
  • No specific object
Mark for review

What does the reduce() method do in JavaScript?

  • Executes a function once for each array element
  • Returns the first element of an array
  • Reduces the array to a single value
  • Joins two or more arrays
Mark for review

What will be the output of console.log(0.1 + 0.2 === 0.3)?

  • TRUE
  • FALSE
  • Error
  • NaN
Mark for review

Which function is used to convert a string to uppercase in JavaScript?

  • toUpperCase()
  • upperCase()
  • toUpper()
  • uppercase()
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 will be the output of console.log(typeof(undefined))?

  • undefined
  • null
  • NaN
  • undefined
Mark for review

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

  • TRUE
  • FALSE
  • TypeError
  • undefined
Mark for review

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

  • TRUE
  • FALSE
  • Error
  • NaN
Mark for review

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

  • 'hello'
  • 'HELLO'
  • 'h'
  • TypeError
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

What will be the output of console.log(typeof([]))?

  • array
  • object
  • list
  • string
Mark for review

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

  • onclick
  • onhover
  • onchange
  • onkeydown
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 does the term "DOM" stand for in JavaScript?

  • Document Object Model
  • Dynamic Object Manipulation
  • Document Order Model
  • Document Organization Model
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