79522691

Date: 2025-03-20 10:58:57
Score: 1
Natty:
Report link
/**
 * Adds superhero names to the `mySuperHero` array.
 * Example superheroes added: "Super Man", "Spider Man", "Iron Man".
 */
mySuperHero.push("Super Man");
mySuperHero.push("Spider Man");
mySuperHero.push("Iron Man");

console.log(mySuperHero);`

mySuperHero: string[]
Always specify array types explicitly (`string[]`), otherwise, TypeScript may infer the array type as **never**.
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Zuraiz Khan