New answers tagged

0

Let me give you some advice: First of all you should make your code much more rideable. I am struggling to actually read this code. You should name your variables meaningfully, so the code can be read like English. Don't write multiple commands on a single line. It is easier to keep track of code when single command per line is used. When writing ...


1

Code and style Odd name to use as a variable For you have been forced to capitalize it which is not in line with JS naming conventions. ES6 lets you use keywords as property names, but I would not encourage using them even if you use capitals to avoid syntax errors. Maybe next would be more appropriate. I have not seen collapsed closing blocks in a long ...


1

The overall approach looks fine. Some suggestions: Delegated click logic The current backForth being used both as a click listener and on the initial load feels a bit clunky since you have to pass in {target:{className: "buttonS"}}. Consider making a separate function that you pass an index to increment (either 1 or -1), and call that inside ...


Top 50 recent answers are included