Quiz Sagar...
x
OR
We'll never share your email with anyone else.

Facing Issue in Login Click Here

No Result Found

Total

0

Correct

0

InCorrect

0

Score

0%

JavaScript Objective Questions:

Which company developed JavaScript?

  • Netscape
  • Microsoft
  • Google
  • IBM
  • option1
  • Clear All
Clear All

Which of the following is a JavaScript data type?

  • Number
  • Character
  • Float
  • Word
  • option1
  • Clear All
Clear All

Which symbol is used for single-line comments in JavaScript?

  • < !-- -->
  • //
  • **
  • #
  • option2
  • Clear All
Clear All

Which method is used to display data in a dialog box?

  • prompt()
  • display()
  • msg()
  • alert()
  • option4
  • Clear All
Clear All

Which keyword is used to declare a variable in JavaScript?

  • float
  • var
  • int
  • string
  • option2
  • Clear All
Clear All

Which operator is used to assign a value to a variable?

  • =
  • = =
  • : =
  • ===
  • option1
  • Clear All
Clear All

Which of the following is a looping structure in JavaScript?

  • for
  • while
  • do...while
  • All of the above
  • option4
  • Clear All
Clear All

Which function is used to parse a string to an integer?

  • convert()
  • stringToInt()
  • parseFloat()
  • parseInt()
  • option4
  • Clear All
Clear All

What does typeof operator do in JavaScript?

  • Checks value
  • Checks type
  • Declares variable
  • Converts to string
  • option2
  • Clear All
Clear All

What will typeof null return?

  • "null"
  • "object"
  • "undefined"
  • "boolean"
  • option2
  • Clear All
Clear All

Which method is used to add an element to the end of an array?

  • push()
  • pop()
  • shift()
  • unshift()
  • option1
  • Clear All
Clear All

How to create a function in JavaScript?

  • function = myFunc()
  • function myFunc()
  • def myFunc()
  • create myFunc()
  • option2
  • Clear All
Clear All

How to call a function named greet?

  • call greet()
  • greet();
  • greet{}
  • call.greet();
  • option2
  • Clear All
Clear All

Which built-in method returns the length of a string?

  • size()
  • length()
  • count()
  • length
  • option4
  • Clear All
Clear All

Which of the following is used for strict equality in JavaScript?

  • ==
  • ===
  • =
  • !=
  • option2
  • Clear All
Clear All

What is the output of console.log(2 + "2")?

  • 4
  • "4"
  • "22"
  • Error
  • option3
  • Clear All
Clear All

JavaScript is a _____ language.

  • Server-side
  • Client-side
  • Object-based
  • All of the above
  • option4
  • Clear All
Clear All

Which event occurs when the user clicks on an HTML element?

  • onmouseover
  • onclick
  • onchange
  • onmouseclick
  • option2
  • Clear All
Clear All

What does DOM stand for?

  • Data Object Method
  • Document Object Model
  • Document Order Model
  • None of the above
  • option2
  • Clear All
Clear All

How do you write an if statement in JavaScript?

  • If x > y:
  • If(x > y)
  • if x > y then
  • ) if x > y {}
  • option2
  • Clear All
Clear All