Q. Which of the following function of Array object removes the last element from an array and returns that element?

  • (A) push()
  • (B) delete()
  • (C) pop()
  • (D) link()
πŸ’¬ Discuss
βœ… Correct Answer: (C) pop()

Q. A Javascript developed in Unix machine

  • (A) will throw errors and exceptions
  • (B) must be restricted to a Unix Machine only C.
  • (C) will be displayed as a JavaScript text on the browser
  • (D) will work perfectly well on a Windows Machine
πŸ’¬ Discuss
βœ… Correct Answer: (D) will work perfectly well on a Windows Machine

Q. What will be the output of following JavaScript Code?

Code:
<script type="text/javascript" language="javascript"> 
  
var a = "Tanmay Acarya"; 
var result = a.substring(4, 5); 
document.write(result); 
  
</script> 
  • (A) a
  • (B) y
  • (C) n
  • (D) c
πŸ’¬ Discuss
βœ… Correct Answer: (A) a

Q. Original Name of Javascript is

  • (A) Mocha
  • (B) LiveScript
  • (C) Escript
  • (D) Javascript
πŸ’¬ Discuss
βœ… Correct Answer: (A) Mocha

Q. What is the output?

Code:
int a==2;
int b=4;
int ans=a+b;
print(ans);
  • (A) 2
  • (B) 6
  • (C) error
  • (D) 0
πŸ’¬ Discuss
βœ… Correct Answer: (C) error

Q. What are the types of Pop up boxes available in JavaScript?

  • (A) Prompt
  • (B) Alert
  • (C) Confirm
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. Javascript is which type of language

  • (A) Interpreted
  • (B) Compiled
  • (C) NA
  • (D) NA
πŸ’¬ Discuss
βœ… Correct Answer: (A) Interpreted

Q. Assume the Output

Code:
var a = '20';
var b = a = 30;
document.write(a+b);
  • (A) 60
  • (B) 50
  • (C) 20
  • (D) 30
πŸ’¬ Discuss
βœ… Correct Answer: (B) 50

Q. Javascript is ideal to

  • (A) increase the download time for the client
  • (B) minimize storage requirements on the web server
  • (C) make computations in HTML simpler
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) minimize storage requirements on the web server

Q. A function definition expression is known as

  • (A) Function calls
  • (B) Function definiation
  • (C) Function calling
  • (D) Function literal
πŸ’¬ Discuss
βœ… Correct Answer: (D) Function literal