by thefj · 5y ago · 0 comments
(cache[key] = cache[key] || fn(...args));
Will not memoize results that equal 0 or an empty string.I guess it goes to show that copying answers from stack overflow might not be the best idea, whether it's done manually or using ML.
Pairing works when you either pair two strong programmers or pair a strong programmer with a weak one. In the latter case, the main advantage is that it's also a mentoring opportunity.
Copilot has invented a pair programming situation in which your partner constantly introduces dubious code you must painstakingly verify, but is itself incapable of being mentored.
Although `in` possibly opens you up to prototype issues. JavaScript is a bundle of fun.
Collection types are prevalent in languages like Java, but JS devs had to use plain objects for years.