- Notifications
You must be signed in to change notification settings - Fork230
Objects#321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Objects#321
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| ¿Los objetos son ordenados? Es decir, si creamos un bucle sobre un objeto, ¿obtenemos todas las propiedades en el mismo orden en el que se agregaron? ¿Podemos confiar en ello? | ||
| The short answer is: "ordered in a special fashion":integer properties are sorted, others appear in creation order. The details follow. | ||
| La respuesta corta es: "ordenados de una forma especial":las propiedades de enteros se ordenan, los demás aparecen en el orden de la creación. Entremos en detalle. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Me parece que enteros necesita números para ser más claro. O conservarinteger
| La respuesta corta es: "ordenados de una forma especial": las propiedades de enteros se ordenan, los demás aparecen en el orden de la creación. Entremos en detalle. | |
| La respuesta corta es: "ordenados de una forma especial": las propiedades denúmerosenteros se ordenan, los demás aparecen en el orden de la creación. Entremos en detalle. |
| ````smart header="¿Propiedades de enteros? ¿Qué es eso?" | ||
| El término "propiedad de enteros" aquí significa que una cadena se puede convertir a y desde desde un entero sin nigún cambio. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| ````smart header="¿Propiedades de enteros? ¿Qué es eso?" | |
| El término "propiedad de enteros" aquí significa que una cadena se puede convertir a y desde desde un entero sin nigún cambio. | |
| ````smart header="¿Propiedades denúmerosenteros? ¿Qué es eso?" | |
| El término "propiedad de enteros" aquí significa que una cadena se puede convertir a y desde desde unnúmeroentero sin nigún cambio. |
| alert(String(Math.trunc(Number("49"))) );// "49",same, integer property | ||
| alert(String(Math.trunc(Number("+49"))) );// "49",not same"+49" ⇒not integer property | ||
| alert(String(Math.trunc(Number("1.2"))) );// "1",not same"1.2" ⇒not integer property | ||
| // Math.trunces una función incorporada que elimina la parte decimal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
built-in se refiere a las funciones que vienen por defecto dentro de JavaScript
| // Math.trunc es una funciónincorporada que elimina la parte decimal | |
| // Math.trunc es una funciónnativa que elimina la parte decimal |
| -To iterate over an object:`for (let keyin obj)` loop. | ||
| Operadores adicionales: | ||
| -Para eliminar una propiedad:`deleteobj.prop`. | ||
| -Para comprobar si existe una propiedad con la clave proporcionada:`"key"in obj`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| -Para comprobar si existe una propiedad con la clave proporcionada:`"key" in obj`. | |
| -Para comprobar si existe una propiedad con la clave proporcionada:`"key" in obj`. |
Uh oh!
There was an error while loading.Please reload this page.
javascript-translate-bot commentedJul 25, 2020
Please make the requested changes. After it, add a comment "/done". |
joaquinelio left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
hola, coso!
jjjajajaj
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| let key="age"; | ||
| alert(*!*key*/!* in user );//true,property"age"exists | ||
| alert(*!*key*/!* in user );//true,porque su propiedad"age"si existe dentro del objeto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| alert(*!*key*/!* in user ); // true, porque su propiedad "age"si existe dentro del objeto | |
| alert(*!*key*/!* in user ); // true, porque su propiedad "age"sí existe dentro del objeto |
| En el código anterior, la propiedad`obj.test`técnicamente existe. Entonces el operador`in`funciona correctamente. | ||
| Situations like this happen very rarely, because`undefined`should not be explicitly assigned. We mostly use`null`for "unknown" or "empty" values. So the`in`operator is an exotic guest in the code. | ||
| Situaciones como esta suceden raramente ya que`undefined`no debe ser explícitamente asignado. Comunmente usamos`null`para valores "desconocidos" o "vacios". Por lo que el operdaor`in`es un invitado exótico en nuestro código. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| Situaciones como esta suceden raramente ya que`undefined` no debe ser explícitamente asignado.Comunmente usamos`null` para valores "desconocidos" o "vacios". Por lo que eloperdaor`in` es un invitado exótico en nuestro código. | |
| Situaciones como esta suceden raramente ya que`undefined` no debe ser explícitamente asignado.Comúnmente usamos`null` para valores "desconocidos" o "vacíos". Por lo que eloperador`in` es un invitado exótico en nuestro código. |
Me suena horrible, pero la norma dice que el acento se arrastra y se transforma en esdrújula
me preguntaste por fundeu...
www.fundeu.es/consulta/comun-comunmente-2784/
| ```js | ||
| for (keyin object) { | ||
| //executes the body for each key among object properties | ||
| //se ejecuta e cuerpo para cada clave entre las propiedades del objeto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| // se ejecutae cuerpo para cada clave entre las propiedades del objeto | |
| // se ejecutael cuerpo para cada clave entre las propiedades del objeto |
| Nota que todas las construcciones"for"nos permiten declarar variables para bucle dentro del bucle, como`let key`aquí. | ||
| Also, we could use another variable name here instead of`key`.For instance,`"for (let prop in obj)"`is also widely used. | ||
| Además podriamos usar otros nombres de variables en lugar de`key`.Por ejemplo,`"for (let prop in obj)"`también se usa bastante. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| Ademáspodriamos usar otros nombres de variables en lugar de`key`. Por ejemplo,`"for (let prop in obj)"` también se usa bastante. | |
| Ademáspodríamos usar otros nombres de variables en lugar de`key`. Por ejemplo,`"for (let prop in obj)"` también se usa bastante. |
Uh oh!
There was an error while loading.Please reload this page.
javascript-translate-bot commentedJul 25, 2020
Please make the requested changes. After it, add a comment "/done". |
Co-authored-by: Daniel Garcia <jdanielink@gmail.com>
…urce.jsCo-authored-by: Daniel Garcia <jdanielink@gmail.com>
Co-authored-by: Daniel Garcia <jdanielink@gmail.com>
Co-authored-by: Daniel Garcia <jdanielink@gmail.com>
Co-authored-by: Daniel Garcia <jdanielink@gmail.com>
| @@ -1 +1 @@ | |||
| Just loop over the object and`return false`immediately if there's at least one property. | |||
| Solo cre un bucle sobre el objeto y un`return false`inmediatamente si hay al menos una propiedad. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| Solocre un bucle sobre el objeto y un`return false` inmediatamentesi hay al menos una propiedad. | |
| Solocrea un bucle sobre el objeto y,si hay al menos una propiedad, devuelve`false` inmediatamente. |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| Podemos agregar, eliminar y leer archivos de ahí en cualquier momento. | ||
| Property values are accessible using the dot notation: | ||
| Se puede acceder a los valores de las propiedades utilizando la notación de punto: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Aquí no lo tomo como absoluto amigo. "Por" y "de" no hacen diferencia conceptual. Al traductor del artículo en MDN le pareció bien usar "por" y solo eso, vaya, en ambos casos se entiende claro
|  | ||
| We can also use multiword property names, but then they must be quoted: | ||
| También podemos nombrar propiedades con más de una plabra (*multiword*). Pero, de ser así, debemos citarlos`"..."`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
¡Sí! Pensé lo mismo peero mientras hago labor de traducción a veces se me funde el cerebro y se me acaban las ideas.@danielgrj
Uh oh!
There was an error while loading.Please reload this page.
| El `const`podría darerrorsolo si intentamos configurar`user=...`en lo absoluto. | ||
| There's another way to make constant object properties, we'll cover it later in the chapter <info:property-descriptors>. | ||
| Hay otra manera de crear propiedades de objeto constantes, las cubriremos después en el capítulo <info:property-descriptors>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Tampoco quise dar a entender "objetos constantes" Es clara la confusión gramatical. Gracias por la correción
maksumi commentedJul 26, 2020
/done |
maksumi commentedJul 26, 2020
Aló...@joaquinelio@danielgrj |
joaquinelio left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Aprobar? ni loco,
Pffff una porquería.
apocope "primera", algun tilde que se me habia escapado, etcetcetcetctcetcetc
mmm debería borrar el comentario para no espantar a tu compatriota, ja ja
que hizo buena revisión
explicale que no hay maldad, solo es que soy algo transtornado.
cambios importantes:
varios "llaves" que eran "corchetes"
por las dudas verifiqué el drae
y llaves no es generico como brackets, es especificamente " { } " (cuando crea obj)
y corchetes " [ ] " (cuando accessdes props.)
entonces donde ilya dice "brackets" hay que fijarse cuales
es confuso hacer review.
creo que deberiamos explicar el uso de los label y el /done nunca les hice caso
pero ahora con el repo por fin prolijo, evitaría ssuperposiciones, es decir dessperdicio de trabajo.
Don bot rules!
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
javascript-translate-bot commentedJul 27, 2020
Please make the requested changes. After it, add a comment "/done". |
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
Co-authored-by: joaquinelio <joaquinelio@gmail.com>
maksumi commentedJul 27, 2020
/done |
maksumi commentedJul 27, 2020
Jajajaja, sale,@joaquinelio en la desesperación de verle merge lo más pronto a este artículo decidí reemplazar todos los "brackets" olvidándome de los "square brackets". |
joaquinelio commentedJul 27, 2020
Estoy dormido, así que supongo revisaste y cambiaste asi qe esta vez apruebo sin una mirada asusta un poco la velocidad en que aparecen pr, saludos y buenas noches |
joaquinelio left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
ah, no, era acá
aprob
javascript-translate-bot commentedJul 27, 2020
Thank you 💖 I updated the Progress Issue#17 🎉 🎉 🎉 |
No description provided.