Sail E0 Webinar

MCQs

Total Questions : 82 | Page 3 of 9 pages
Question 21. The property of a primary expression is
  1.    stand-alone expressions
  2.    basic expressions containing all necessary functions
  3.    contains variable references alone
  4.    complex expressions
 Discuss Question
Answer: Option A. -> stand-alone expressions
Question 22. A function definition expression can be called
  1.    Function prototype
  2.    Function literal
  3.    Function definition
  4.    Function declaration
 Discuss Question
Answer: Option B. -> Function literal
Question 23. The JavaScript’s syntax calling ( or executing ) a function or method is called
  1.    Primary expression
  2.    Functional expression
  3.    Invocation expression
  4.    Property Access Expression
 Discuss Question
Answer: Option C. -> Invocation expression
Question 24. Consider the following statements
var text = "testing: 1, 2, 3"; // Sample text
var pattern = /d+/g // Matches all instances of one or more digits
In order to check if the pattern matches with the string “text”, the statement is
  1.    text==pattern
  2.    text.equals(pattern)
  3.    text.test(pattern)
  4.    pattern.test(text)
 Discuss Question
Answer: Option D. -> pattern.test(text)
Question 25. What kind of an expression is “new Point(2,3)”?
  1.    Primary Expression
  2.    Object Creation Expression
  3.    Invocation Expression
  4.    Constructor Calling Expression
 Discuss Question
Answer: Option B. -> Object Creation Expression
Question 26. Which of the operator is used to test if a particular property exists or not?
  1.    in
  2.    exist
  3.    within
  4.    exists
 Discuss Question
Answer: Option A. -> in
Question 27. Among the following, which one is a ternary operator?
  1.    +
  2.    :
  3.    –
  4.    ?:
 Discuss Question
Answer: Option D. -> ?:
Question 28. JavaScript is a _______________ language
  1.    Object-Oriented
  2.    High-level
  3.    Assembly-language
  4.    Object-Based
 Discuss Question
Answer: Option D. -> Object-Based
Question 29. “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
  1.    Properties
  2.    Prototypes
  3.    Lvalue
  4.    Definition
 Discuss Question
Answer: Option C. -> Lvalue
Question 30. The output for the following code snippet would most appropriately be
var a=5 , b=1
var obj = { a : 10 }
with(obj)
  1.    10
  2.    Error
  3.    1
  4.    5
 Discuss Question
Answer: Option C. -> 1

Latest Videos

Latest Test Papers