DEV Community

Discussion on: Can You write a complex program only using const variables in javascript?

Collapse
 
ozzyogkush profile image
Derek Rosenzweig

Depends. If you ever need to re-assign a value to a variable or use a for ... of or for ... in loop , the answer is no. If you do not, then the answer is yes. Sometimes it's unavoidable, and even if it were avoidable, that may not necessarily be the right move.