Candidate Name : CE Joy Schedule : Schedule A Attempt : 3rd | 31st July ,2003
Marks Obtained : 30
Total Marks : 100
Recalculate
Submit
Q.1 What is the purpose of the alt attribute in an "<img>" tag??

The alt attribute changes the size of the image

The alt attribute provides alternative text for an image. It is used for accessibility, helping screen readers describe the image to visually impaired users. It also appears when the image fails to load.

(0/3)
Q.2 What is the best way to handle errors in JavaScript?

Ignore errors if the code still runs because fixing them takes extra time

Use try...catch blocks, validate inputs, and log errors to avoid unexpected crashes and improve debugging.

(0/3)
Q.3 Why should you use const and let instead of var in JavaScript?

Using const and let prevents unintentional variable redeclaration and follows block scoping, improving code reliability.

Using const and let prevents unintentional variable redeclaration and follows block scoping, improving code reliability.

(3/3)