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.
11
u/FormulaNewt Jan 14 '23
I mostly judge him for using var.
8
u/Willinton06 Jan 13 '23
The formatting is off but other than that seems fine
2
u/Free_Word268 Jan 13 '23
Isn't this just a normal DFS? I don't really see the issue here.
5
u/[deleted] Jan 14 '23
What’s the issue? All I see is line wrapping from the text editor/IDE…
3
u/TotoShampoin Jan 14 '23
7 SPACES INDENT?
1
u/[deleted] Jan 13 '23
I’ve always wondered, is coding in another language more difficult?
1
u/[deleted] Jan 14 '23
I seriously cannot stand anyone that uses more than 2 tab spaces