0

Java Script Online Quiz

Description: Java Script,java,sql,mysql
Number of Questions: 11
Created by:
Tags: programming
Attempted 0/11 Correct 0 Score 0

What is the correct syntax for adding comments in JavaScript?

  1. <!–This is a comment–&gt

  2. //This is a comment

  3. –This is a comment

  4. This is a comment


Correct Option: B

What will be the output of the following code? document.write(typeof(24.49));

  1. float

  2. number

  3. integer

  4. double


Correct Option: B

How is the function called in JavaScript?

  1. Geekfunc();

  2. call Geekfunc();

  3. function Geekfunc();

  4. call function GeekFunc();


Correct Option: A

What is the JavaScript syntax for printing values in Console?

  1. console.log(5);

  2. console.print(5);

  3. print(5)

  4. print.console(5);


Correct Option: A

Which of the following is not a reserved word in JavaScript?

  1. interface

  2. throws

  3. short

  4. program


Correct Option: D

Predict the output of the following JavaScript code : a = 8 + "8"; document.write(a);

  1. 16

  2. Complilation Error

  3. 88

  4. Run Time Error


Correct Option: C

Which of the following is the correct syntax to display “GeeksforGeeks” in alert box using JS?

  1. alertbox(“GeeksforGeeks”);

  2. alert(“GeeksforGeeks”);

  3. msg(“GeeksforGeeks”);

  4. msgbox(“GeeksforGeeks”);


Correct Option: B

What is the HTML tag under which one can write the JavaScript code?

  1. <javascript>

  2. <script>

  3. <scripted>

  4. <js>


Correct Option: B

Predict the output: function geek() { if(true) { var a = 5; } document.write(a); } geek();

  1. Compilation Error

  2. Runtime error

  3. Nothing will be printed as output

  4. 5


Correct Option: D

JavaScript is a ________ Side Scripting Language.

  1. Server

  2. Browser

  3. ISP

  4. None of the above


Correct Option: B

Who is the Chief Operating Officer of SAP SE ?

  1. Stefan Ries

  2. Michael Kleinemeier

  3. Christian Klein

  4. Luka Mucic


Correct Option: C
- Hide questions