Skip to content

Instantly share code, notes, and snippets.

@lorenzoongithub
Created June 2, 2015 22:11
Show Gist options
  • Save lorenzoongithub/d7ad430a786063895427 to your computer and use it in GitHub Desktop.
Save lorenzoongithub/d7ad430a786063895427 to your computer and use it in GitHub Desktop.
lodash
//
// lodash - https://lodash.com/
//
load('https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.9.3/lodash.js');
x = _.assign({ 'a': 1 }, { 'b': 2 }, { 'c': 3 })
if (x.a != 1) throw '';
if (x.b != 2) throw '';
if (x.c != 3) throw '';
x = _.map([1, 2, 3], function(n) { return n * 3; });
if (x.length != 3) throw ''
if (x[0] != 3) throw ''
if (x[1] != 6) throw ''
if (x[2] != 9) throw ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment