Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exercises/10.1 #20

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
21 changes: 21 additions & 0 deletions bloco_10/dia_1/exercicio1/compare.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const obj1 = {
title: 'My Title',
description: 'My Description',
};

const obj2 = {
description: 'My Description',
title: 'My Title',
};

const obj3 = {
title: 'My Different Title',
description: 'My Description',
};

// implemente seus testes aqui
module.exports = {
obj1,
obj2,
obj3,
}
10 changes: 10 additions & 0 deletions bloco_10/dia_1/exercicio1/myFizzBuzz.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function myFizzBuzz(num) {
if (typeof num !== 'number') return false;
if (num % 3 === 0 && num % 5 === 0) return 'fizzbuzz';
if (num % 3 === 0) return 'fizz';
if (num % 5 === 0) return 'buzz';
return num;
}

// implemente seus testes aqui
module.exports = myFizzBuzz;
12 changes: 12 additions & 0 deletions bloco_10/dia_1/exercicio1/myRemove.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function myRemove(arr, item) {
let newArr = [];
for (let index = 0; index < arr.length; index += 1) {
if (item !== arr[index]) {
newArr.push(arr[index]);
}
}
return newArr;
}

// implemente seus testes aqui
module.exports = myRemove;
14 changes: 14 additions & 0 deletions bloco_10/dia_1/exercicio1/myRemoveWithoutCopy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
function myRemoveWithoutCopy(arr, item) {
for (let index = 0, len = arr.length; index < len; index += 1) {
if (arr[index] === item) {
arr.splice(index, 1);
index -= 1;
len -= 1;
}
}

return arr;
}

// implemente seus testes aqui
module.exports= myRemoveWithoutCopy;
1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/acorn

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/atob

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/browserslist

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/escodegen

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/esgenerate

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/esparse

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/esvalidate

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/is-ci

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/is-docker

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/jest

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/jest-runtime

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/js-yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/jsesc

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/json5

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/parser

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/rimraf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/sane

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/semver

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/sshpk-conv

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/sshpk-sign

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/sshpk-verify

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/uuid

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/watch

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bloco_10/dia_1/exercicio1/node_modules/.bin/which

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions bloco_10/dia_1/exercicio1/node_modules/@babel/code-frame/LICENSE

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions bloco_10/dia_1/exercicio1/node_modules/@babel/code-frame/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

167 changes: 167 additions & 0 deletions bloco_10/dia_1/exercicio1/node_modules/@babel/code-frame/lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading