Skip to content

Instantly share code, notes, and snippets.

@mshustov
Last active March 27, 2016 14:49
Show Gist options
  • Save mshustov/3d66c32265bdc46ca2ee to your computer and use it in GitHub Desktop.
Save mshustov/3d66c32265bdc46ca2ee to your computer and use it in GitHub Desktop.
var hello = 'hello';
var world = 'world';
var mark = '!';
var options = {
silent: true
};
function greet(options, first, second){
if (options.silent){
return '...';
}
var local = [first, second, mark].join(' ');
return local
}
greet = greet.bind(null, options);
['Alice', 'John'].forEach(function(name){
console.log(name, 'said:', greet(hello, world));
})
var hello = 'hello';
var world = 'world';
var mark = '!';
var options = {
silent: true
};
function greet(options, first, second){
if (options.silent){
return '...';
}
var local = [first, second, mark].join(' ');
return local
}
greet = greet.bind(null, options);
['Alice', 'John'].forEach(function(name){
console.log(name, 'said:', greet(hello, world));
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment