Skip to content

Instantly share code, notes, and snippets.

@kakts
Created November 29, 2015 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kakts/85c4233d577cbd9fa385 to your computer and use it in GitHub Desktop.
Save kakts/85c4233d577cbd9fa385 to your computer and use it in GitHub Desktop.
var _ = require('lodash');
var list = ['a', 'b', 'c', 'd'];
_.each(list, function(data) {
console.log('------', data);
if (data === 'b') {
return false;
}
console.log('-----after');
});
[output]
------ a
-----after
------ b
@gthuo
Copy link

gthuo commented Oct 9, 2017

Good one. Thanks for the gist. Works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment