Discussion
Which of the following statements is/are true ?
P : In a scripting language like JavaScript, types are typically associated with values, not variables.
Q : It is not possible to show images on a web page without the <img> tag of HTML.
Select the correct answer from the options given below :
Answer: A
The answer is P only.
Statement P is true: JavaScript is dynamically typed, so a variable can hold a number at one moment and a string the next; the type belongs to the value, not to the variable.
Statement Q is false: images can be shown without the img tag, for example as CSS background images, through the picture or object elements, or drawn with canvas or SVG. So 'Q only', 'Both' and 'Neither' are wrong.
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development