Skip to main content

New answers tagged

2 votes

JavaScript program that calculates the sum and difference of a pair of numbers

There are only two hard problems in computing: cache invalidation and getting programmers to pay attention to naming things. Taking the time to figure out good names is the key to being a good ...
TorbenPutkonen's user avatar
4 votes

JavaScript program that calculates the sum and difference of a pair of numbers

I want to build on @Abion47's answer, because it hits on a lot of key points but misses two crucial items. Your program should not just print successes; it should also print descriptive error ...
Robin's user avatar
  • 141
9 votes
Accepted

JavaScript program that calculates the sum and difference of a pair of numbers

Use const instead of let when possible Declaring a variable with let tells JavaScript you ...
Abion47's user avatar
  • 206
6 votes

JavaScript program that calculates the sum and difference of a pair of numbers

Procedural decomposition is a useful tool to manage complexity, and separation of "business logic" from user interaction common. I think the naming of procedures can be improved here: ...
5 votes

JavaScript program that calculates the sum and difference of a pair of numbers

I'm not a JavaScript guy by any means, but I can apply what I know from related languages and let others shoot me down... In setup(), I don't think we need the ...
Toby Speight's user avatar
  • 88.3k
2 votes

Shorten my asynchronous DB queries, using async.js module

One ES-6 technique is to use the await keyword. As the MDN documentation says: This feature is well established and works across many devices and browser versions. ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
3 votes

Fruity Balance GUI Remake

Purely from a graphics perspective, this looks great. But there it pretty much ends. This sounds harsher than I intended it to be, but bear with me. IMHO, there are a few fundamental issues that are ...
tacoshy's user avatar
  • 512

Top 50 recent answers are included