Q. What are the different types of errors in JavaScript?

  • (A) Load time errors
  • (B) Run time errors
  • (C) Logical Errors
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) Run time errors

Q. Which of the following built-in method is used to remove the last element from an array and return that element?

  • (A) last()
  • (B) pop()
  • (C) get()
  • (D) None of the above.
πŸ’¬ Discuss
βœ… Correct Answer: (B) pop()

Q. Which function is used in JavaScript for URL encoding?

  • (A) Server.URLEncode()
  • (B) UREncoding
  • (C) encodeURI()
  • (D) rawurlencode()
πŸ’¬ Discuss
βœ… Correct Answer: (C) encodeURI()

Q. JavaScript is the programming language of the _____.

  • (A) Desktop
  • (B) Mobile
  • (C) Web
  • (D) Server
πŸ’¬ Discuss
βœ… Correct Answer: (C) Web

Q. Which type of JavaScript language is _____?

  • (A) Object-oriented
  • (B) Object-based
  • (C) Functional programming
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) Object-based
Explanation: JavaScript is not a pure OOP's (object oriented programming) based languages such as PHP, java or many other languages, although it is an object-based language. It is not OOP's based language, because it doesn't have three basic properties of object-oriented programming languages, such as polymorphism, encapsulation, and inheritance.

Q. Which of the following statement(s) is true about the JavaScript?

  • (A) It is a scripting language used to make the website interactive
  • (B) It is an advanced version of Java for Desktop and Mobile application development
  • (C) It is a markup language of Java to develop the webpages
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above

Q. In which HTML element, we put the JavaScript code?

  • (A) <javascript>...</javascript>
  • (B) <js>...</js>
  • (C) <script>...</script>
  • (D) <css>...</css>
πŸ’¬ Discuss
βœ… Correct Answer: (C) <script>...</script>

Q. JavaScript code can be written in ____.

  • (A) JavaScript file (.js file)
  • (B) HTML document directly
  • (C) JavaScript file and in HTML document directly
  • (D) In style sheets (.css file)
πŸ’¬ Discuss
βœ… Correct Answer: (C) JavaScript file and in HTML document directly

Q. Which symbol is used separate JavaScript statements?

  • (A) Comma (,)
  • (B) Colon (:)
  • (C) Hyphen (_)
  • (D) Semicolon (;)
πŸ’¬ Discuss
βœ… Correct Answer: (D) Semicolon (;)

Q. JavaScript ignores?

  • (A) newlines
  • (B) tabs
  • (C) spaces
  • (D) All of the above
πŸ’¬ Discuss
βœ… Correct Answer: (D) All of the above