Skip to content

Commit 666ef69

Browse files
committed
Primeira lista de assuntos para estudo adicionada
1 parent fc12fcc commit 666ef69

File tree

6 files changed

+175
-105
lines changed

6 files changed

+175
-105
lines changed

es6-features/arrow-functions.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Entendendo _arrow function_ <3
2+
3+
Primeiramente vamos definir uma função normal:
4+
5+
```JS
6+
//declarando um array
7+
const brasil = ['Olinda', 'Recife', 'Rio de Janeiro']
8+
9+
//declarando uma function normal
10+
const love = brasil.map(function(name) {
11+
return `I love ${name}`;
12+
});
13+
14+
```
15+
16+
Transformando a função acima em _arrow function_
17+
18+
```JS
19+
//declarando uma arrow function
20+
const loveArrow = brasil.map((name) => {
21+
return `I love ${name}`
22+
})
23+
24+
```
25+
26+
```JS
27+
//se só tiver um parâmetro não é necessário adiconar os parênteses.
28+
const loveArrowSingle = brasil.map(name => {
29+
return `I love ${name}`
30+
})
31+
32+
```
33+
34+
```JS
35+
//se for possível declarar em uma única linha não é necessário usar as chaves e nem a palavra "return"
36+
const loveArrowOneline = brasil.map(name => `I love ${name}`)
37+
38+
```
39+
40+
### [<-- Back](https://github.com/simoneas02/JS)

es6-features/const.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Const e Freeze
2+
3+
> **const** – É uma variável que não pode ter seu valor reatribuido, ou seja, será constante toda vida, porém se for um objeto, os valores dentro dela poderão ser modificados.
4+
5+
```JS
6+
//Criando um objeto dog
7+
8+
const dog = {
9+
name: pug,
10+
age: 2
11+
};
12+
```
13+
14+
```JS
15+
//Alterando o objeto adicionando uma nova propriedade
16+
//retornará erro porque o objeto é do tipo const
17+
18+
const dog =
19+
{
20+
name: pink,
21+
age: 4
22+
};
23+
24+
```
25+
26+
```JS
27+
//Alterando a propriedade do objeto dog
28+
29+
dog.name = bower;
30+
31+
```
32+
33+
> ***freeze*** - É possível deixar um objeto imutável passando ele como parâmetro no método _Object.freeze(object)_, feito isso não é possível reescrever nem modificar o objeto e suas propriedades.
34+
35+
```JS
36+
Object.freeze(dog);
37+
38+
```
39+
40+
### [<-- Back](https://github.com/simoneas02/JS)

es6-features/template-literals.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Template Literal
2+
3+
> Permite criar strings com variáveis internas e concatenar de uma forma bem mais fácil
4+
5+
```JS
6+
const skill = {
7+
learn: 'Ecma6',
8+
love: 'React'
9+
}
10+
11+
//Exemplo de strings com variáveis no método JS Ecma5
12+
var texto = "Eu quero aprender " + skill.learn + " e " + skill.love
13+
14+
//com Ecma6
15+
const literalTexto = `Eu quero aprender + ${skill.learn} e ${skill.love}`
16+
17+
const skills = 'JS'
18+
+ '\n'
19+
+ 'React'
20+
+ '\n'
21+
+ 'Polymer';
22+
23+
const literalSkills =
24+
`JS
25+
React
26+
Polymer`;
27+
```
28+
29+
### [<-- Back](https://github.com/simoneas02/JS)

js-notes.md

-105
This file was deleted.

readme.md

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# JS Notes
2+
3+
> Estudos regulares e constantes através de [Daily Tasks](daily-tasks.md) :purple_heart:
4+
5+
## Javascript básico
6+
7+
[References](references/js-basico.md)
8+
9+
- [ ] [Estrutura léxica]()
10+
- [ ] [Tipos, valores e variáveis]()
11+
- [ ] [Expressões e operadores]()
12+
- [ ] [Instruções]()
13+
- [ ] [Objetos]()
14+
- [ ] [Arrays]()
15+
- [ ] [Funções]()
16+
- [ ] [Expressões Regulares]()
17+
- [ ] [Strict mode]()
18+
19+
## Javascript avançado
20+
21+
[References](references/js-avancado.md)
22+
23+
- [ ] [Prototype e herança]()
24+
- [ ] [Garbage collector]()
25+
- [ ] [Concurrency model and Event Loop]()
26+
27+
## ES6 features
28+
29+
[References](references/es6-references.md)
30+
31+
- [ ] [Let]()
32+
- [x] [Const](es6-features/const.md)
33+
- [x] [Arrow Function ](es6-features/arrow-function.md)
34+
- [x] [Template literals](es6-features/template-literals.md)
35+
- [ ] [Default parameters]()
36+
- [ ] [Rest parameterss]()
37+
- [ ] [Destructurings]()
38+
- [ ] [Class]()
39+
- [ ] [Módulos]()
40+
- [ ] [Symbol]()
41+
- [ ] [Iterators]()
42+
- [ ] [Generators]()
43+
- [ ] [Promises]()
44+
45+
## Web
46+
47+
[References](references/web.md)
48+
49+
Service Workers
50+
51+
## NodeJS
52+
53+
[References](references/module-bundler.md)
54+
55+
## Tests
56+
57+
[References](references/tests.md)

references/es6-references.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ES6 References
2+
3+
- [Javascript com TDD na prática](https://www.eventick.com.br/javascript-com-tdd-na-pratica)
4+
- [ES6 para humanos](https://github.com/alexmoreno/ES6-para-humanos)
5+
- [O Guia do ES6: TUDO que você precisa saber](https://medium.com/@matheusml/o-guia-do-es6-tudo-que-voc%C3%AA-precisa-saber-8c287876325f#.q0kbmoolq)
6+
- [ECMAScript 6 Learning](https://github.com/ericdouglas/ES6-Learning)
7+
- [ES6 Cheatsheet](https://github.com/DrkSephy/es6-cheatsheet)
8+
9+
### [<-- Back](https://github.com/simoneas02/JS)

0 commit comments

Comments
 (0)