Skip to content

Commit

Permalink
Create 01-04-objetos.js
Browse files Browse the repository at this point in the history
V0.4.4_InicioJavascript_Semana4.
  • Loading branch information
DenuArg authored May 18, 2023
1 parent 10653b1 commit 79868e3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Javascript/Semana 4/01-04-objetos.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
let x= 10; // Variable de tipo primitiva
console.log(x.length);
console.log('Tipos Primitivos');
//Objeto
let persona = {
nombre:'Carlos',
apellido:'Gil',
email:'cgil@gmail.com',
edad:30,

nombreComleto: function () { //metodo
return this.nombre+' '+this.apellido;
}
}
console.log(persona.nombre);
console.log(persona.apellido);
console.log(persona.email);
console.log(persona.edad);
console.log(persona);
console.log(persona.nombreComleto());

0 comments on commit 79868e3

Please sign in to comment.