Question · JavaScript and TypeScript course · Module 2: Functions, Arrays and Objects

Const vs Let vs Var

Which variable declaration is best for a constant dinosaur species value?

Answer options

  • var species = "Velociraptor";
  • const species = "Velociraptor";
  • All are equally good
  • let species = "Velociraptor";
Show the answer

Correct answer:

  • const species = "Velociraptor";