Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
JavaScript is a versatile, high-level programming language. It is the programming language in all browsers.and can be used for back-end programming with node.js. Use this tag for questions regarding vanilla JavaScript; optionally tagged with an ECMAScript version. If you are using a preprocessor such as TypeScript please tag with that too.
4
votes
Accepted
Interview Coding Test: Transaction Processing: Get balance by category in given period
It is inefficient and overengineered because the code
loops through the transactions several times when once would be enough, both by the multiple filters and the two separate loops.
uses more memor …
1
vote
How to refactor and reduce complexity of this code
Since every if statement also has a return, you don't need the else, you can just start the next if without typing else.
This reduces the "indentation" and keeps the code "flat" (for lack of better wo …
13
votes
Egg size Prompt Box
Since you already checked > 69 , if you get to the next else if you don't need to check that it is && eggWeight <= 69, that is already known. The same applies to all of your <= checks, so you can just …
0
votes
Displaying filtered user data using Ajax and PHP
Have you tested the server response time independently of your frontend code? The page being slow might not be because of your code being inefficient, if the server or database takes a long time then …