2 ms·
Does the author ever claim what language the code is in? Sure, it looks like JavaScript, but he could easily have just borrowed JavaScript's function syntax (wh
by baddox 16y ago
Does the author ever claim what language the code is in? Sure, it looks like JavaScript, but he could easily have just borrowed JavaScript's function syntax (which is easily readable to anyone who's used virtually any imperative programming language) for his pseudocode.
The potential "bug" you pointed out has nothing to do with the algorithm being taught, and is an implementation detail that's irrelevant for this application.