Let vs var

here we are using let keyword to declare a variable but can’t we use var keyword as well !!

Depends on what you mean by “can”. If the exercises check for let, then no, var won’t match.
You should generally prefer let or const unless you can argue for why var is better for your purpose

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.