Skip to content

Commit 4c24fa0

Browse files
Funciones
Funciones see also: # resolves:#
1 parent bf8c354 commit 4c24fa0

File tree

11 files changed

+139
-0
lines changed

11 files changed

+139
-0
lines changed

016 Funciones/.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

016 Funciones/.idea/.name

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

016 Funciones/.idea/jsLibraryMappings.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

016 Funciones/.idea/misc.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

016 Funciones/.idea/modules.xml

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

016 Funciones/.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

016 Funciones/arrayII.iml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="WEB_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$" />
6+
<orderEntry type="sourceFolder" forTests="false" />
7+
</component>
8+
</module>

016 Funciones/funciones.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* Objetos */
2+
3+
const person = {
4+
name: 'brian',
5+
age:'26',
6+
sons: ['laura', 'diego', 'pepe', 'rosa', 'tomas']
7+
}
8+
9+
//console.log(person.name);
10+
11+
// recorrido al objeto CLAVES
12+
for(const key in person){
13+
console.log(key)
14+
}
15+
16+
17+
// recorrido al objeto VALORES
18+
for(const key1 in person){
19+
console.log(person[key1])
20+
}
21+
22+
// Recorrido de hijos
23+
for(const son of person.sons){
24+
console.log(`hijos ${son}`)
25+
}

016 Funciones/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<title>Bucles</title>
6+
</head>
7+
<body>
8+
9+
<script src="funciones.js"></script>
10+
11+
</body>
12+
</html>

016 Funciones/readme.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
### Obetos - Introduccion
2+
3+
Son estructuras de datos que representan propiedades, valores y acciones que pueden realizar el objeto
4+
5+
Todos lo objetos tienen propiedades o atributos y comportammientos o acciones representados por pares de clave(key)(value)
6+
7+
8+
== Objetos Ejemplo ==
9+
10+
```js
11+
const computer = {
12+
screensize: 17,
13+
model:'Macbook Pro'
14+
}
15+
```
16+
17+
18+
```js
19+
const table = {
20+
material: 'madera',
21+
width: 160,
22+
height: 110
23+
}
24+
```
25+
### Acceso al Objeto
26+
27+
para acceder a las propierdades y acciones del objeto se utiliza la nomanclatura del punto
28+
29+
```js
30+
const person = {
31+
name: 'brian',
32+
age:'26',
33+
sons: ['laura', 'diego']
34+
}
35+
36+
console.log(person, name)
37+
console.log(person, age)
38+
console.log(person, sons[0])
39+
console.log(person, sons[1])
40+
```

0 commit comments

Comments
 (0)