A sintaxe reduzida é similar a da getter e setter introduziada no ECMAScript 5.
The shorthand syntax is similar to the getter and setter syntax introduced in ECMAScript 2015.
Descrição A sintaxe reduzida é similar à da getter e setter introduzida no ECMAScript 5.
Description The shorthand syntax is similar to the getter and setter syntax introduced in ECMAScript 2015.
No ECMAScript 5 existem dois tipos de propriedades: de dados e de acesso.
In ECMAScript 5 there are two types of properties, data and accessor.
Antes, na ECMAScript 5, não existia uma forma nativa de se listar todas as propriedades de um objeto.
In ECMAScript 5, there is no native way to list all properties of an object.
Sintaxe ocatal não é parte do ECMAScript 5, mas é suportado em todos os navegadores prefixando o número octal com um zero: 0644 === 420 e"\045" === "%".
The octal syntax isn't part of ECMAScript 5, but it's supported in all browsers by prefixing the octal number with a zero: 0644 === 420 and"\045" === "%".
Se você chamar f([1,2,3], obj) em um ambiente ECMAScript 5, então a referência de values dentro da declaração with irá ser obj.
If you call f([1,2,3], obj) in an ECMAScript 5 environment, then the values reference inside the with statement will resolve to obj.
Começando com a ECMAScript 5, há três formas nativas de se listar (ou "caminhar por") as propriedades de um objeto
Starting with ECMAScript 5, there are three native ways to list/traverse object properties
Descrição A sintaxe reduzida é similar a da getter e setter introduziada no ECMAScript 5.
Description The shorthand syntax is similar to the getter and setter syntax introduced in ECMAScript 2015.
A outra maneira (introduzido no ECMAScript 5) consiste em tratar a string como um objeto Array-like, onde os carateres individuais correspondem a um índice numérico
The other way (introduced in ECMAScript 5) is to treat the string as an array-like object, where individual characters correspond to a numerical index
Mas em ECMAScript 5, você escreveria (lembrar que em ES5 não há geradores)
In ECMAScript 5 you would write it like this (but note that ES5 has no generators)
Aqui, objetos globais se referem aos objetos no escopo global (somente se o modo estrito/strict mode do ECMAScript 5 não for usado; Nesse caso retorna undefined).
Here, global objects refer to objects in the global scope (but only if ECMAScript 5 strict mode is not used! Otherwise it returns undefined).
Contenu potentiellement sensible ou inapproprié
Les exemples vous aident à traduire le mot ou l’expression cherchés dans des contextes variés. Ils ne sont ni sélectionnés ni validés par nous et peuvent contenir des mots ou des idées inappropriés. Signalez des exemples à modifier ou à retirer. Les traductions potentiellement sensibles, inappropriées ou familières sont généralement marquées de rouge ou d’orange.