Q. Which one of the following is used for the calling a function or a method in the JavaScript:

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

Q. The "new Point(3,2)", is a kind of _______ expression

  • (A) Object Creation Expression
  • (B) Primary Expression
  • (C) Invocation Expression
  • (D) Constructor Calling Expression
πŸ’¬ Discuss
βœ… Correct Answer: (A) Object Creation Expression

Q. Which one of the following operator is used to check weather a specific property exists or not:

  • (A) Exists
  • (B) exist
  • (C) within
  • (D) in
πŸ’¬ Discuss
βœ… Correct Answer: (D) in

Q. Which one of the following is an ternary operator:

  • (A) ?
  • (B) ;
  • (C) -
  • (D) +
πŸ’¬ Discuss
βœ… Correct Answer: (A) ?

Q. "An expression that can legally appear on the left side of an assignment expression." is a well known explanation for variables, properties of objects, and elements of arrays. They are called_____

  • (A) Properties
  • (B) Prototypes
  • (C) Definition
  • (D) Lvalue
πŸ’¬ Discuss
βœ… Correct Answer: (D) Lvalue

Q. Which of the following is the correct output for the following JavaScript code:

Code:
function display1(option)  
{  
    return(option ?  "true" :  "false");  
}  
    bool ans=true;  
console.log(display1(ans));  
  • (A) False
  • (B) True
  • (C) Runtime error
  • (D) Compilation error
πŸ’¬ Discuss
βœ… Correct Answer: (B) True

Q. Which one of the following is correct output for the following given JavaScript code:

Code:
var  obj=  
{  
    length:20,  
    height:35,  
}  
if('breadth' in obj === false)   
{  
    obj.breadth = 12;  
}  
   
console.log(obj.breadth); 
  • (A) Error
  • (B) Undefined
  • (C) 12
  • (D) 20
πŸ’¬ Discuss
βœ… Correct Answer: (C) 12

Q. Which one of the following is correct output for the following given JavaScript code:

Code:
functionheight()  
{     
var  height=123.56;  
var type =(height>=190)?"Taller":"Little short";  
return type;  
}  
  • (A) 123.56
  • (B) Taller
  • (C) 190
  • (D) Little shorter
πŸ’¬ Discuss
βœ… Correct Answer: (B) Taller

Q. Which one of the following is correct output for the following given JavaScript code:

Code:
string  X= "Good";  
string  Y="Evening";  
alert(X+Y);  
  • (A) Good
  • (B) Evening
  • (C) GooodEvening
  • (D) undefined
πŸ’¬ Discuss
βœ… Correct Answer: (C) GooodEvening

Q. Which one of the following is correct output for the following given JavaScript code

Code:
functionoutputfun(object)  
{  
    var place=object ?object.place: "Italy";  
    return "clean:"+ place;  
}  
console.log(outputfun({place:India}));  
  • (A) Error
  • (B) clean:Italy
  • (C) clean:India
  • (D) undefined
πŸ’¬ Discuss
βœ… Correct Answer: (C) clean:India