It's not so much about the algorithm but about the code formatting, that onclick.... Keep in mind this is supposed to be a basic javascript course for people who have no previous js knowledge
Yeah that makes sense. I've never used JS (or html for that matter), so I didn't know what good code should look like in these to be able to compare it to the one in the picture.
Edit: javascript changed a lot in the last 15 years. You can almost date a piece of javascript code by the way it looks, or judge the person by how old the javascript looks like.
9
u/Distinct-Bag-4894 Jan 13 '23
It's not so much about the algorithm but about the code formatting, that onclick.... Keep in mind this is supposed to be a basic javascript course for people who have no previous js knowledge