Skip to content

Commit c1b2df5

Browse files
author
Douglas1688
committed
[ADD] Clase 9 de JS - Objetos
1 parent a456aa2 commit c1b2df5

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

clase_9/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<html lang="en">
2+
<head>
3+
<meta charset="UTF-8">
4+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<script src="script.js"></script>
7+
<title>Document</title>
8+
</head>
9+
<body>
10+
11+
12+
</body>
13+
</html>

clase_9/script.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const persona = {
2+
name: 'Douglas',
3+
age: 32,
4+
country: 'Ecuador',
5+
programming_lenguages: ['Python','JS']
6+
}
7+
8+
console.log(persona.name);
9+
10+
// for(const key in persona){
11+
// console.log(key);
12+
// }
13+
for(const key in persona){
14+
console.log(`${key} : ${persona[key]}`);
15+
}
16+
17+
18+
for(const son of persona.programming_lenguages){
19+
console.log(son);
20+
}

0 commit comments

Comments
 (0)