Skip to content

Instantly share code, notes, and snippets.

@dherman
Created May 20, 2012 22:50
Show Gist options
  • Save dherman/2759829 to your computer and use it in GitHub Desktop.
Save dherman/2759829 to your computer and use it in GitHub Desktop.
chaining and indentation
var users = records.map(function(record) {
return record.username;
})
.filter(function(username) { return !!username })
.map(function(username) {
return username.toLowerCase();
});
var users = records.map(function(record) {
return record.username;
})
.filter(function(username) { return !!username })
.map(function(username) {
return username.toLowerCase();
});
var users = records.map(function(record) {
return record.username;
})
.filter(function(username) { return !!username })
.map(function(username) {
return username.toLowerCase();
});
var users = records.map(function(record) {
return record.username;
})
.filter(function(username) { return !!username })
.map(function(username) {
return username.toLowerCase();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment