Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Do Javascript ao React: aprendendo e se adaptan...

Do Javascript ao React: aprendendo e se adaptando a mudanças aula 1 | From Javascript to React: learning and adapting to change lesson 1

- Semana da Tecnologia de 2018 na FATEC Sorocaba (08/10/2018): workshop de 2 dias

Juliana Negreiros

October 08, 2018
Tweet

More Decks by Juliana Negreiros

Other Decks in Technology

Transcript

  1. function multiplica(n1){ return n2 => n1 * n2 } const

    dobro = multiplica(2) console.log(dobro(8))
  2. forEach(element, index) const numeros = [1, 2, 3, 4, 5,

    6] const print = numeros => numeros.forEach(numero => console.log(numero)) print(numeros)
  3. map(element, index, array) const numeros = [1, 2, 3, 4,

    5, 6] const dobros = numeros.map(numero => numero * 2)
  4. filter(element, index, array) const numeros = [1, 2, 3, 4,

    5, 6] const pares = numeros.filter(numero => numero % 2 === 0)
  5. reduce(prevVal, elemento, index, array, initVal) const numeros = [1, 2,

    3, 4, 5, 6] const total = numeros.reduce((prev, numero) => prev + numero, 0)
  6. DOM