Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
function Persona(nom, ape1) {
  this.nombre = nom;
  Object.defineProperties(this, {
    apellido1: {
      value: ape1,
      writable: false
    }
  });
}
var p = new Persona("Bruce", "Wayne");
console.log(p.nombre);
p.apellido1 = "Díaz";
console.log(p.apellido1);
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
aitormedran0pro
0viewers