Skip to content

Instantly share code, notes, and snippets.

@fritzvd
Created September 13, 2014 10:50
Show Gist options
  • Save fritzvd/25cda0ec362e669fefca to your computer and use it in GitHub Desktop.
Save fritzvd/25cda0ec362e669fefca to your computer and use it in GitHub Desktop.
Performance in javascript
// this is wrong
var multiList = [];
multiList += 'string';
multiList += 9;
multiList += 3.14;
// if you really want a list like this do this:
var multiList = ['string', 9 , 3.14];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment