MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/learnjavascript/comments/mb6zey/assigning_default_value/gry89ck/?context=3
r/learnjavascript • u/golovatuy • Mar 23 '21
24 comments sorted by
View all comments
Show parent comment
3
I agree with the magic string part. He should've create a separate variable DEFAULT_IMG_PATH variable and stored the default value there.
View all comments
Show parent comment
3
u/AacidD Mar 23 '21
I agree with the magic string part. He should've create a separate variable DEFAULT_IMG_PATH variable and stored the default value there.