This file contains hidden or 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
function player (forca, stamina, agilidade) { | |
var hp = stamina * 10 | |
function umaFuncaoPrivadaGrande (que, recebe, varios, parametros) { | |
// essa função é um método privado de um objeto. | |
// você pode chamar ela quando precisar ou até torná-la pública | |
} | |
return { |
This file contains hidden or 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
function contador () { | |
var valor = 0 | |
return { | |
incrementar: function () { | |
valor += 1 | |
}, | |
getValor: function () { | |
return valor | |
} |
This file contains hidden or 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
function pai (carro) { | |
var comida = 'pizza' | |
function filho () { | |
console.log(comida) | |
function neto () { | |
console.log(carro) | |
} |
This file contains hidden or 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
function pai (umNumero) { | |
var metadeDoNumero = umNumero / 2 | |
function filho () { | |
console.log(umNumero) | |
console.log(metadeDoNumero) | |
} | |
filho() | |
} |
This file contains hidden or 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
body { | |
background-color: black; | |
font-family: Lucida Sans Unicode; | |
color: #ffffff; | |
} | |
div { | |
border: 1px solid black; | |
} |
NewerOlder