Created
July 18, 2014 12:22
-
-
Save jonatanrdsantos/1687be2b4b853aad8c02 to your computer and use it in GitHub Desktop.
Example Module Pattern
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$( document ).ready(function() { | |
var mariobros = (function () { | |
function playSong() { | |
var bpm = 180, | |
song = beeplay({ | |
bpm: bpm | |
}) | |
//play("E5", 1/2).play(null, 1/3).play("E5", 1/2).play(null, 1/3).play("E5", 1/2).play(null, 1/3).play("C5", 1/2).play("E5", 2/2).play("G5", 3/2).play("G4", 2/2); | |
} | |
return { | |
playSong: playSong, | |
outrafuncao: function (recebealgo) { | |
alert(recebealgo); | |
return 'nope'; | |
} | |
} | |
})(); | |
mariobros.playSong(); | |
var resultOtra = mariobros.outrafuncao('oi outrafuncao, tudo Bem com vc? quer tc comigo?'); | |
console.log(resultOtra); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment