AMP

Chapter 14: Introduction to Javascript — Online MCQ Test

COMPUTER APPLICATIONS · CLASS 11th · Tamil Nadu State Board
Practice Chapter 14: Introduction to Javascript with a free chapter-wise online MCQ test. This chapter covers: This chapter introduces client-side web scripting using JavaScript syntax data types variables and operators. Students integrate scripts with HTML documents for dynamic web page be.... AI-generated questions from basic to board-exam level, with instant results and explanations.

Start Exam on Full Site →

Chapter 14: Introduction to Javascript — Important Questions & Answers

Which tag is used to embed JavaScript code in an HTML document?
  • A. <script>
  • B. <javascript>
  • C. <js>
  • D. <codeScript>
Answer: A. <script>
The <script> tag is the standard HTML tag used to define client-side scripts like JavaScript.
Which of the following is the correct way to write a comment in JavaScript?
  • A. <!-- Comment -->
  • B. /* Comment */
  • C. ' Comment
  • D. ?? Comment
Answer: B. /* Comment */
/* ... */ is used for multi-line comments, while // is used for single-line comments in JavaScript.
Which keyword is used to declare a variable in JavaScript?
  • A. var
  • B. dim
  • C. int
  • D. def
Answer: A. var
The 'var' keyword is the standard way to declare variables in JavaScript.
What is the result of the expression: 5 + '5'?
  • A. 10
  • B. 55
  • C. Error
  • D. undefined
Answer: B. 55
JavaScript performs string concatenation when a number is added to a string.
What is the return type of the typeof operator when used on a null value?
  • A. null
  • B. object
  • C. undefined
  • D. string
Answer: B. object
In JavaScript, typeof null returns 'object', which is a well-known historical bug in the language.