Skip to main content
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
Results tagged with
Search options not deleted user 42984

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.

2 votes
0 answers
595 views

Clickpocalypse 2 automation script

Clickpocalypse 2 is kind of dungeon crawler game but with minor controls. Script's purpose to automate what is left. To try it out: Open "Clickpocalypse 2" as separate browser window (not a tab, game …
outoftime's user avatar
  • 1,729
2 votes
1 answer
480 views

Idle Miner part 2: levels service

My previous post had no response, so there is part of the whole - levels service. It stores levels with it's attributes. I'd like to hear any suggestions about code readability and code performance. …
outoftime's user avatar
  • 1,729
6 votes

Calculating Fibonacci numbers

Complexity Sequence definition $$ F_{n+2} = F_{n+1} + F_n $$ which means that your complexity is \$ O(n) \$. Matrix definition $$ { \left ( \begin{matrix} 1 & 1 \\ 1 & 0 \ …
outoftime's user avatar
  • 1,729
2 votes
0 answers
883 views

Simple clicker game

I have started my clicker game using angular.js about week ago. I have finished current functionality first night, but still have feeling of misunderstanding some basic approaches. This is sources ro …
outoftime's user avatar
  • 1,729
8 votes

Writing null-safe code to set form values

Can you do this? Yes, you can. When to do this? Everywhere, except collaboration purposes. Why? (document.getElementById(arr[i].id) || 0).value = arr[i].value; and (document.getElementById(ar …
outoftime's user avatar
  • 1,729
-1 votes

"Utopian Tree" challenge optimization

Use preprocessed values. function processData(input) { var parse_fun = function (s) { return parseInt(s, 10); }, heights = function() { var result = [1] …
outoftime's user avatar
  • 1,729
5 votes

Loading div sections from separate files

<script type="text/javascript" src="libs/angular/angular.min.js"></script> <script type="text/javascript" src="libs/angular-route/angular-route.min.js"></script> <script type="text/javascript" src="js/ …
outoftime's user avatar
  • 1,729
2 votes
Accepted

Long arithmetic addition in JS

Performance improvements related to approach Interger base For better performance we can split number not by every digit but by set of digits with given base. Look at Number.MAX_SAFE_INTEGER and som …
outoftime's user avatar
  • 1,729
4 votes

Object-oriented JavaScript and Google Maps objects memory management

This algorithm assumes the knowledge of a set of objects called roots (In JavaScript, the root is the global object). …
outoftime's user avatar
  • 1,729
2 votes
Accepted

Separate Ajax code in separate modules

About code style, I highly recommend you to read angular code style even if you have no idea what is it. It contains a lot of sanity approaches about how to make HUGE classes clear and smooth. About …
outoftime's user avatar
  • 1,729
1 vote

Garbage collection in JavaScript multiplayer game

Create arrays with required size to prevent reallocation overhead var visible = new Array(required_size); You can look at good overview for array allocations from codereview, but different topi …
outoftime's user avatar
  • 1,729
0 votes

Hovering over images to show another image whilst fading in & out

You can use 2 custom attributes instead of one. In this case you should not swap src value, just replace it. <img src="some/img.jpg" data-foreground-src="some/img.jpg" data-background-src …
outoftime's user avatar
  • 1,729