Skip to content

Commit

Permalink
Criado o arquivo destructuring3 da aula 65. Operadores: Destructuring c…
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael-Lima-GTR committed Jan 12, 2022
1 parent 4287428 commit 75e4ccc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 0 additions & 10 deletions exercicios-web/fundamentos/destructuring3.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function rand({ min = 0, max = 1000 }) {
const valor = Math.random() * (max - min) + min;
return Math.floor(valor);
};

const obj = { max: 50, min: 40 };
console.log(rand(obj));
console.log(rand({ min: 955 }));
console.log(rand({}));
console.log(rand());

0 comments on commit 75e4ccc

Please sign in to comment.