New answers tagged

0

Implementation Review Ten years ago there were typically users that would commonly use IE and code like this that creates elements, adds event handlers to those elements and then removes those elements had the possibility to leak memory. While that may not be an issue anymore it is something to consider. A simpler approach would use event delegation to ...


6

Welcome to Code Review. The CSS looks quite good. I haven’t seen too many style sheets with color lightsalmon 😃. Below are some suggestions. Cache DOM references ”...DOM access is actually pretty costly - I think of it like if I have a bridge - like two pieces of land with a toll bridge, and the JavaScript engine is on one side, and the DOM is on the ...


6

Variables Always use a variable declaration when first declaring your variable. If you don't your variable will be put into the global scope, which is almost never what you want. It also makes it more clear that you don't want to re-assign to an already existing global variable. So for starting_day, for example, put a var, let, or const in front of it. HTML ...


1

Question Responses Using and tracking this is confusing at times. Have I been over-the-top in my use of this? I don't feel it is "over-the-top" though storing a reference to this in another variable is a sign that context isn't bound properly. Bear in mind that an arrow function "Does not have its own bindings to this or super, and should ...


Top 50 recent answers are included