Skip to content

Instantly share code, notes, and snippets.

@rodrigo-x
Created October 15, 2012 00:23
Show Gist options
  • Select an option

  • Save rodrigo-x/3890265 to your computer and use it in GitHub Desktop.

Select an option

Save rodrigo-x/3890265 to your computer and use it in GitHub Desktop.
snippet - teste...
var Pessoa = (function(){
var nome = 'John Smith';
var idade = 30;
var updatePessoa = function(){
nome = 'John Smith Updated';
}
var setPessoa = function(){
nome = 'John Smith Set';
}
var getPessoa = function(){
return nome;
}
return {
set: setPessoa,
get: getPessoa
};
}());
alert(Pessoa.get());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment