Skip to content

Instantly share code, notes, and snippets.

@vadymberkut
Created September 28, 2016 18:49
Show Gist options
  • Save vadymberkut/eb50148515d84bbbf952ae9b844487a0 to your computer and use it in GitHub Desktop.
Save vadymberkut/eb50148515d84bbbf952ae9b844487a0 to your computer and use it in GitHub Desktop.
js-module
var MyModule = (function(){
function _log() {
console.log(arguments);
}
function _warn(){
console.warn(arguments);
}
return {
map: function(array, action){
var resultArray = [];
for(var i = 0; i < array.length; i++){
resultArray.push(action(array[i]));
}
return resultArray;
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment