All pastes #427724 Raw Edit

Mine

public text v1 · immutable
·published 2007-04-06 23:29 UTC
rendered paste body
//Definimos a Classe
function Retangulo(){

    //Atributo privado
    var width = 200;

    //Atributo público
    this.height = 100;

}

var ret = new Retangulo();

alert("Largura: "+ ret.width);//Resposta: undefined
alert("Altura: "+ ret.height);//Resposta: 100