Why do we have to use "const" to declare new variables in functions?

Why do we have to use “const” to declare new variables in functions.

Link to lesson - https://www.codecademy.com/courses/introduction-to-javascript/lessons/functions/exercises/return-ii

Hello @objectrockstar25636, welcome to the forums! You don’t have to, but I believe it is just good practise to declare a variable that won’t change with const.
I hope this helps!

1 Like