Q. Which of the following attributes are common to both audio and video?

  • (A) controls
  • (B) enter
  • (C) control
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (A) controls

Q. The primary purpose of the array map() function is that it

  • (A) passes each element of the array and returns the necessary mapped elements
  • (B) maps the elements of another array into itself
  • (C) passes each element of the array on which it is invoked to the function you specify, and returns an array containing the values returned by that function
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) passes each element of the array on which it is invoked to the function you specify, and returns an array containing the values returned by that function

Q. Which of the following is not the property of the video tag?

  • (A) width
  • (B) breadth
  • (C) height
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) breadth

Q. Which of the following is the parameter used to invoke the Audio() constructor?

  • (A) File type
  • (B) Music type
  • (C) Both File and Music
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) Both File and Music

Q. Consider the following code snippet

  • (A) Prints the contents of each property of o
  • (B) Returns undefined
  • (C) All of the mentioned
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (B) Returns undefined

Q. Which is an equivalent code to invoke a function m of class o that expects two arguments x and y?

  • (A) o(x,y);
  • (B) o.m(x) && o.m(y);
  • (C) m(x,y);
  • (D) o.m(x,y);
πŸ’¬ Discuss
βœ… Correct Answer: (D) o.m(x,y);

Q. Consider the following code snippet :

Code:
var grand_Total=eval("10*10+5");
  • (A) 10*10+5
  • (B) 105 as a string
  • (C) 105 as an integer value
  • (D) Exception is thrown
πŸ’¬ Discuss
βœ… Correct Answer: (C) 105 as an integer value

Q. Do functions in JavaScript necessarily return a value ?

  • (A) It is mandatory
  • (B) Not necessary
  • (C) Few functions return values by default
  • (D) All of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (C) Few functions return values by default

Q. Consider the following code snippet :

Code:
var tensquared = (function(x) {return x*x;}(10));
  • (A) Yes, perfectly
  • (B) Error
  • (C) Exception will be thrown
  • (D) Memory leak
πŸ’¬ Discuss
βœ… Correct Answer: (A) Yes, perfectly

Q. Consider the following code snippet :

  • (A) 123
  • (B) 123xyz
  • (C) Exception
  • (D) NaN
πŸ’¬ Discuss
βœ… Correct Answer: (B) 123xyz