Q. Which was the first browser to support JavaScript ?

  • (A) Netscape
  • (B) IE
  • (C) Mozilla Firefox
  • (D) Google Chrome
πŸ’¬ Discuss
βœ… Correct Answer: (A) Netscape

Q. The snippet that has to be used to check if “a” is not equal to “null” is

  • (A) if(a!=null)
  • (B) if (!a)
  • (C) if(a!null)
  • (D) if(a!==null)
πŸ’¬ Discuss
βœ… Correct Answer: (D) if(a!==null)

Q. The statement a===b refers to

  • (A) Both a and b are equal in value, type and reference address
  • (B) Both a and b are equal in value
  • (C) Both a and b are equal in value and type
  • (D) There is no such statement
πŸ’¬ Discuss
βœ… Correct Answer: (C) Both a and b are equal in value and type

Q. Assume that we have to convert “false” that is a non-string to string. The command that we use is (without invoking the “new” operator)

  • (A) false.toString()
  • (B) String(false)
  • (C) String newvariable=”false”
  • (D) Both false.toString() and String(false)
πŸ’¬ Discuss
βœ… Correct Answer: (D) Both false.toString() and String(false)

Q. Consider the following snippet code

Code:
var string1 = ”123”;
 var intvalue = 123;
 alert( string1 + intvalue );
  • (A) 123246
  • (B) 246
  • (C) 123123
  • (D) Exception
πŸ’¬ Discuss
βœ… Correct Answer: (C) 123123

Q. The JavaScript’s syntax calling ( or executing ) a function or method is called

  • (A) Primary expression
  • (B) Functional expression
  • (C) Invocation expression
  • (D) Property Access Expression
πŸ’¬ Discuss
βœ… Correct Answer: (C) Invocation expression

Q. Cost for Using JavaScript in your HTML is

  • (A) Its Free !!!
  • (B) $10 / Year
  • (C) $15 / Year
  • (D) $5 / Year
πŸ’¬ Discuss
βœ… Correct Answer: (A) Its Free !!!

Q. JavaScript Code is written inside file having extension

  • (A) .jvs
  • (B) .javascript
  • (C) .js
  • (D) .jsc
πŸ’¬ Discuss
βœ… Correct Answer: (C) .js

Q. Why JavaScript is called as Lightweight Programming Language ?

  • (A) because JS is available free of cost
  • (B) because JS is client side scripting
  • (C) because we can add programming functionality inside JS
  • (D) because JS can provide programming functionality inside but up to certain extend.
πŸ’¬ Discuss
βœ… Correct Answer: (D) because JS can provide programming functionality inside but up to certain extend.

Q. JavaScript is also called as

  • (A) Server Side Scripting Language
  • (B) Browser Side Scripting Language
  • (C) Client Side Scripting Language
  • (D) Both B and C
πŸ’¬ Discuss
βœ… Correct Answer: (D) Both B and C