This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* [Exercício 3] | |
* | |
* Dado que a assinatura da função readdir do módulo fs é: | |
* | |
* | |
* const fs = require('fs') | |
* const path = './' | |
* fs.readdir(path, (err, files) => { | |
* if(err){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* [Exercício 2] | |
* | |
* Dado o seguinte vetor e utilizando somente map, reduce e filter. | |
* | |
* 2a) Gere um novo vetor com a lista de produtos cuja a quantidade seja maior que 0 | |
*/ | |
const produtos = [ | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* [Exercício 1] | |
* | |
* Dado o seguinte vetor e utilizando somente map e reduce, | |
* somar todos os valores de produtos e utilize o console.log para ver o valor na tela. | |
*/ | |
const produtos = [ | |
{ | |
nome: 'Bicicleta', |
NewerOlder