
sierra torres
342 Pointswhats a constants main purpose
like how do you use it in code
constant = favoriteDessert
string = ''pine apples''
2 Answers

Alejandro Soria
1,101 PointsHi! 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 Ortega
2,279 PointsThe 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.