ES6 Object Litteral Shorthand Notation?
- Lingua principale
- HTML
- Stelle
- 65
- Fork
- 15
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
This is a _reasonably_ good/useful feature: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#New_notations_in_ECMAScript_2015
it allows us to do the following:
``` js
// imagine that there are already variables in your script/app for name and email
var obj = {
name,
email
}
```
instead of having to _type_ out the _values_ for the fields in the `Object`:
``` js
// imagine that there are already variables in your script/app for name and email
var obj = {
name: name,
email: email
}
```
The JavaScript engine _infers_ what the _values_ are given the names of the keys in the `Object`...
Given that _most_ browsers _don't_ support this...

I will be using it _selectively_...
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Non viene indicato alcun file del repository, test o punto di ingresso. Inizia leggendo il riferimento MDN collegato e gli esempi in questo issue, quindi individua dove learn-javascript introduce i literal oggetto; done deve essere definito come una lezione o un esempio concordato che copra la notazione abbreviata di ES6 e le indicazioni sul supporto dei browser.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- documentation
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100