How can I Change the Array content from from different functions | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can I Change the Array content from from different functions

The Array is in Codeline 330 and i need to Change the content of this Array in Line 450. So sombody know how to do that ? I'm Feeling dumb https://code.sololearn.com/WRfOY5DCaja6/?ref=app

19th Jan 2022, 8:47 AM
Shiko
Shiko - avatar
1 Answer
+ 1
I think you just need to change the array declaration from "const" to "var". constant values are unchangeable. this way you can change it anywhere.
19th Jan 2022, 8:56 AM
Mafdi
Mafdi - avatar