whats a constants main purpose
like how do you use it in code
constant = favoriteDessert string = ''pine apples''
Hi! You have to use "let" to declare a constant (not "constant") and remove the "=". Also, make sure you use "" instead of ' ' in your string. Hope that helps!
Michel Ortega2,279 Points
The main purpose of a constant is to help with the memory while running the program. In this case, if you know that a value won't change, set it as a constant so the performance of the program (e.g. an app) is optimized.