Skip to content
This repository was archived by the owner on Mar 14, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
37a8782
adding the information for the correct file
Cris-Rocha Feb 23, 2022
347d272
adding the exercise-C answer
Cris-Rocha Feb 23, 2022
292239c
adding the exercise D
Cris-Rocha Feb 23, 2022
c9e8e5c
adding the exercise D
Cris-Rocha Feb 23, 2022
640b82f
adding the exercise E
Cris-Rocha Feb 23, 2022
cf1e78c
adding the exercise D
Cris-Rocha Feb 23, 2022
b4fb1f1
adding the exercise F
Cris-Rocha Feb 23, 2022
fa1a0e6
adding extra way to see on console the exercise F
Cris-Rocha Feb 23, 2022
dba633a
adding the exercise G
Cris-Rocha Feb 25, 2022
e09cfa1
adding the answer of the exercise B
Cris-Rocha Feb 25, 2022
3326647
adding the correct answer of the exercise G with percentage symbol an…
Cris-Rocha Feb 25, 2022
488fc32
adding the function exercise-H
Cris-Rocha Feb 25, 2022
d7303ef
adding the answer of the questions of exercise-H
Cris-Rocha Feb 25, 2022
7e8fec4
adding first part of exercise-I
Cris-Rocha Feb 25, 2022
3afd1f4
adding the second part of the exercise -I
Cris-Rocha Feb 25, 2022
b2bbdaa
adding the answer of the exercise 1 F
Cris-Rocha Feb 26, 2022
efdadda
adding the answer of the exercise 1 F
Cris-Rocha Feb 26, 2022
edd63a3
adding the comment to the exercise 1
Cris-Rocha Feb 26, 2022
b600274
adding the comment to the exercise 2
Cris-Rocha Feb 26, 2022
7b30dff
completed the exercise 1 of J 'functions' // comments added
Cris-Rocha Feb 26, 2022
15e34d2
completed the exercise 2 of J 'functions' // comments added
Cris-Rocha Feb 26, 2022
c3c4ef2
adding the information for the function works - K 1
Cris-Rocha Feb 26, 2022
d6deec5
adding the information for the function works - K 2
Cris-Rocha Feb 26, 2022
255ed90
adding the comment for the result
Cris-Rocha Feb 26, 2022
f2d6ca3
adding the function and interpolation for exercise 3 - K
Cris-Rocha Feb 26, 2022
acb49ef
adding the function to the exercise - with comments - ex 4 - K
Cris-Rocha Feb 26, 2022
5db37f9
adding the last exercise of K group - added comments - exercise 5
Cris-Rocha Feb 26, 2022
720426e
adding first part of the function on exercise L - nested functions
Cris-Rocha Feb 26, 2022
5a708ed
correcting the first part of the exercise L
Cris-Rocha Feb 26, 2022
f2d7b6b
adding the exercise L with comments of the prints
Cris-Rocha Feb 26, 2022
7237d3f
adding the correct space on the phrase
Cris-Rocha Feb 26, 2022
ee5ede0
adding the global const Year
Cris-Rocha Feb 26, 2022
08f4da2
correcting the Inclass exercise I
Cris-Rocha Feb 26, 2022
cf99033
making the code smaller using the better practice of the const variable
Cris-Rocha Feb 26, 2022
b1ae73f
correcting the variable of the L exercises
Cris-Rocha Feb 26, 2022
2551b20
changing the variable let to const
Cris-Rocha Feb 27, 2022
595e1d0
changing the var for let
Cris-Rocha Feb 27, 2022
e6a9490
changing the var for let
Cris-Rocha Feb 27, 2022
e134a6d
changing the var for const
Cris-Rocha Feb 27, 2022
61e6ed9
changing the var for const
Cris-Rocha Feb 27, 2022
0cc105e
changing the var for const and changing the name, adding a dot in the…
Cris-Rocha Feb 27, 2022
de5c906
updating the exercise
Cris-Rocha Feb 27, 2022
a039e6d
adding the correct answer about return statement
Cris-Rocha Feb 27, 2022
99d9432
adding the exercise A inclass
Cris-Rocha Mar 3, 2022
92383cc
adding the exercise B to week 2
Cris-Rocha Mar 3, 2022
557a76c
exercise B completed, and answer for the questions added as coments
Cris-Rocha Mar 3, 2022
1e9543b
exercise B completed, and answer for the questions added as coments
Cris-Rocha Mar 3, 2022
4340924
exercise C completed, and answer for the questions added as coments
Cris-Rocha Mar 3, 2022
824eeee
exercise D completed
Cris-Rocha Mar 3, 2022
49cc7bb
exercise E completed and the answer added to the comments
Cris-Rocha Mar 3, 2022
5c399de
exercise F completed
Cris-Rocha Mar 3, 2022
9d1d8cf
correcting an incorrect space on the exercise
Cris-Rocha Mar 3, 2022
4cc96ca
adding the exercise G
Cris-Rocha Mar 3, 2022
306959c
adding the exercise-H - Still need to correct
Cris-Rocha Mar 5, 2022
fe5fda0
adding exercise H correcto
Cris-Rocha Mar 5, 2022
a301469
adding the exercise I with comments
Cris-Rocha Mar 5, 2022
bb643de
adding the exercise-J with comments
Cris-Rocha Mar 5, 2022
30db633
adding exercise K with the comments
Cris-Rocha Mar 5, 2022
57e322c
adding the exercise C
Cris-Rocha Mar 5, 2022
4bf61b7
adding the exercise homework E
Cris-Rocha Mar 5, 2022
0903a5e
adding exercise homework F
Cris-Rocha Mar 5, 2022
3380079
adding exercise homework F
Cris-Rocha Mar 5, 2022
a4ead1c
adding exercise1 to homework G
Cris-Rocha Mar 5, 2022
e189e67
adding exercise 2 of homework G
Cris-Rocha Mar 5, 2022
cad8ca1
adding the exercise-3 of homework G
Cris-Rocha Mar 5, 2022
9cfc077
adding the exercise 4 of the homework G
Cris-Rocha Mar 5, 2022
e87769b
adding the exercise H of the homework
Cris-Rocha Mar 5, 2022
51d72f1
adding exercise I homework
Cris-Rocha Mar 5, 2022
85e11b3
adding the exercise L of the homework
Cris-Rocha Mar 5, 2022
5e979d9
adding exercise M to the homework
Cris-Rocha Mar 5, 2022
468a6f7
adding the exercise K of the homework
Cris-Rocha Mar 5, 2022
f196aef
adding the exercise 2 of homework J
Cris-Rocha Mar 6, 2022
166ab04
adding the exercise L of the Homework
Cris-Rocha Mar 6, 2022
5bac25d
adding exercise M to the homework
Cris-Rocha Mar 6, 2022
6a796c5
adding exercise K of the homework
Cris-Rocha Mar 6, 2022
663cffc
adding the exercise H of the homwork
Cris-Rocha Mar 6, 2022
62fee7c
adding the exercise2 to F homework
Cris-Rocha Mar 6, 2022
29e3754
adding the comment for exercise E
Cris-Rocha Mar 6, 2022
9c484a1
adding the first exercise of J homework
Cris-Rocha Mar 6, 2022
a8c8aad
correcting the Inclass exercise H - some paramethers needed to be exc…
Cris-Rocha Mar 6, 2022
6665338
adding exercise-A Inclass
Cris-Rocha Mar 10, 2022
b22a1a9
test
Cris-Rocha Mar 13, 2022
ac48d71
adding the Inclass exercise A
Cris-Rocha Mar 13, 2022
134a306
testing exercise B
Cris-Rocha Mar 13, 2022
b406f47
teste
Cris-Rocha Mar 14, 2022
301c562
adding the exercise B of the homework
Cris-Rocha Mar 14, 2022
fcd6436
adding the homework exercise C
Cris-Rocha Mar 14, 2022
35b4f59
first try of the homework exercise-D - I would like to review if this…
Cris-Rocha Mar 14, 2022
4a9a7c1
adding the exercise D of the homework
Cris-Rocha Mar 14, 2022
cbe8572
adding the exercise E of the homework
Cris-Rocha Mar 14, 2022
16c30b5
adding exercise B inclass
Cris-Rocha Mar 14, 2022
17615cc
adding the exercise C of the Inclass content
Cris-Rocha Mar 21, 2022
cf3941f
adding the exercise D of the inclass JSI
Cris-Rocha Mar 21, 2022
a6c2e36
adding a peace of the exercise F
Cris-Rocha Mar 21, 2022
5617e96
adding exercise F of the inclass homework
Cris-Rocha Mar 21, 2022
b25e568
adding exercise E of the inclass homework
Cris-Rocha Mar 21, 2022
f329c1f
adding exercise-f - asked help for the teacher, waiting the answer
Cris-Rocha Mar 21, 2022
42147c7
adding exercise H - need to create a new function with .find() now
Cris-Rocha Mar 21, 2022
88f12c9
finished the exercise F of inclass exercises, with the help of the c…
Cris-Rocha Mar 22, 2022
5dfab82
adding the changes of exercise C of the inclass serie of exercises
Cris-Rocha Mar 22, 2022
cc6de63
adding exercise G of inclass
Cris-Rocha Mar 22, 2022
ed1eeac
adding the exercise H of Inclass exercises
Cris-Rocha Mar 25, 2022
75e1717
adding exercise G of inCLASS
Cris-Rocha Mar 25, 2022
8ef88bf
finally adding exercise-I of inclass activity
Cris-Rocha Mar 25, 2022
5007a12
adding exercise C of homework
Cris-Rocha Mar 25, 2022
6d97bee
adding the answer to the exercise D
Cris-Rocha Mar 25, 2022
f3b7916
adding the first exercise of G of the Homework
Cris-Rocha Mar 25, 2022
f12c200
adding the second and last exercise of G of the Homework
Cris-Rocha Mar 25, 2022
6d57b6f
adding first exercise of H homework
Cris-Rocha Mar 25, 2022
196d839
adding the Homework H, exercise 2 - waiting the MC comments about thi…
Cris-Rocha Mar 26, 2022
c17998d
adding the Homework H, the last exercise 3
Cris-Rocha Mar 26, 2022
217bf8d
adding the Homework H, the last exercise 3
Cris-Rocha Mar 26, 2022
9063474
adding the exercise B of the Homework
Cris-Rocha Mar 26, 2022
c2e8dd7
adding the another best way to do this exercise - thanks to codebuddy…
Cris-Rocha Mar 26, 2022
2300105
adding exercise A of Homework
Cris-Rocha Mar 26, 2022
c6d6f76
pushing the worked extra exercise to follow the progress
Cris-Rocha Mar 26, 2022
9148150
adding the last information on the exercise H
Cris-Rocha Mar 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions week-1/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"liveServer.settings.port": 5501
}
8 changes: 7 additions & 1 deletion week-1/Homework/F-strings-methods/exercise.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
// Start by creating a variable `message`

console.log(message);
const nameUser = "Cristiane";
const nameLength = nameUser.length;

console.log(`My name is ${nameUser} and my name have ${nameLength
} characters long.`);

//Prints: My name is Cristiane and my name have 12 characters long.
11 changes: 9 additions & 2 deletions week-1/Homework/F-strings-methods/exercise2.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
const name = " Daniel ";
const nameUser = " Cristiane ";
const nameLength = nameUser.length;

console.log(message);

const message = `My name is ${nameUser.trim()} and my name have ${nameLength
} characters long.`;

console.log(message);

// prints: My name is Cristiane and my name have 12 characters long.
13 changes: 11 additions & 2 deletions week-1/Homework/J-functions/exercise.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
function halve(number) {
// complete the function here
return number / 2;
}

var result = halve(12);
let result = halve(12); // prints 6

let result = halve(17); // print 8.5

let result = halve(1287); //prints 643.5

let result = halve(20); //prints

console.log(result);


console.log(result);
11 changes: 9 additions & 2 deletions week-1/Homework/J-functions/exercise2.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
function triple(number) {
// complete function here
return number * 3;
}

var result = triple(12);
let result = triple(12); // prints 6

console.log(result);
let result = triple(22); // prints 66

let result = triple(222); // prints 666

let result = triple(2222); // prints 6666

console.log(result);
7 changes: 4 additions & 3 deletions week-1/Homework/K-functions-parameters/exercise.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Complete the function so that it takes input parameters
function multiply() {
function multiply(num1, num2) {
// Calculate the result of the function and return it
return num1 * num2;
}

// Assign the result of calling the function the variable `result`
var result = multiply(3, 4);
const result = multiply(3, 4);

console.log(result);
console.log(result); // prints 12
7 changes: 5 additions & 2 deletions week-1/Homework/K-functions-parameters/exercise2.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// Declare your function first
function divide(num1, num2){
return num1 / num2;
}

var result = divide(3, 4);
const result = divide(3, 4);

console.log(result);
console.log(result); // prints 0.75
7 changes: 5 additions & 2 deletions week-1/Homework/K-functions-parameters/exercise3.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// Write your function here
function createGreeting(name){
return `Hello, my name is ${name}.`;
}

var greeting = createGreeting("Daniel");
const greeting = createGreeting("Cristiane");

console.log(greeting);
console.log(greeting); // Prints: Hello, my name is Cristiane.
7 changes: 6 additions & 1 deletion week-1/Homework/K-functions-parameters/exercise4.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
// Declare your function first
function numbers(num1, num2){
return num1 + num2;
}

// Call the function and assign to a variable `sum`

console.log(sum);
const sum = numbers(13, 124);

console.log(sum); // prints 137
5 changes: 4 additions & 1 deletion week-1/Homework/K-functions-parameters/exercise5.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// Declare your function here
function createLongGreeting( name, age ){
return `Hello, my name is ${name} and I'm ${age}years old.`;
}

const greeting = createLongGreeting("Daniel", 30);

console.log(greeting);
console.log(greeting); // prints: Hello, my name is Daniel and I'm 30 years old.
35 changes: 30 additions & 5 deletions week-1/Homework/L-functions-nested/exercise.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
var mentor1 = "Daniel";
var mentor2 = "Irina";
var mentor3 = "Mimi";
var mentor4 = "Rob";
var mentor5 = "Yohannes";
const mentor1 = "Daniel";
const mentor2 = "Irina";
const mentor3 = "Mimi";
const mentor4 = "Rob";
const mentor5 = "Yohannes";

function mentors(mentor){
const nameInUpperCase = mentor.toUpperCase();
return nameInUpperCase;
}
// segunda parte del ejercicio:

function shoutingOutLoud (mentor){
return `HELLO ${mentor.toUpperCase()}`
}

console.log(shoutingOutLoud(mentor1));
console.log(shoutingOutLoud(mentor2));
console.log(shoutingOutLoud(mentor3));
console.log(shoutingOutLoud(mentor4));
console.log(shoutingOutLoud(mentor5));

/* prints:
HELLO DANIEL
HELLO IRINA
HELLO MIMI
HELLO ROB
HELLO YOHANNES
*/

27 changes: 27 additions & 0 deletions week-1/InClass/ejercicio-sabado.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
function resumen(texto) {
return texto.substring(0, 9);
}

const resultadoTexto = resumen("Hola este es un texto de prueba");

console.log(resultadoTexto.slice(0,9)); // Recibimos el resultado: Hola este

/*
console.log("hola esta es una prueba del slice".slice(1,3)); // printa ol
console.log("hola esta es una prueba del slice".substring(1,3)); // printa ol -- igual al .slice
console.log("hola esta es una prueba del slice".slice(0,9)); // printa hola esta
console.log("hola esta es una prueba del slice".substring(0,9)); // printa hol a esta --igual al .slice

*/

// Second exercise

function firstCapitalize(text){
const firstChar = text.charAt(0);
const firstCharCapitalize = firstChar.toUpperCase();
return firstCharCapitalize + text.slice(1);
}

const resultadoEjercicioDos = firstCapitalize("mi mensagen bien escrito");

console.log(resultadoEjercicioDos);
1 change: 1 addition & 0 deletions week-1/InClass/exercise-A.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
console.log("Hello World!");
11 changes: 11 additions & 0 deletions week-1/InClass/exercise-B.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
console.log("Hello World!");
console.log("Olá mundo! // Brasil");
console.log("Holá mundo! // España");
console.log("Hei Verden // Noruego");
console.log("Ciao World // Italia");
console.log("Hallo Weld // Alemania");
console.log("Hej världen // Sueco");
console.log("Witaj świecie // Polaco");
console.log("नमस्ते दुनिया // Hindi");
console.log("Aloha Honua // Hawaiano")
console.log("Helló Világ // Hungaro");
5 changes: 5 additions & 0 deletions week-1/InClass/exercise-C.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
let greeting = "Hello World"

console.log(greeting);
console.log(greeting);
console.log(greeting);
5 changes: 5 additions & 0 deletions week-1/InClass/exercise-D.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const colors = "blue, yellow";

console.log(typeof colors);

console.log(colors);
9 changes: 9 additions & 0 deletions week-1/InClass/exercise-E.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const greetingStart = "Hello, my name is ";
const nameUser = "Cristiane";

const greeting = greetingStart + nameUser;


console.log(greeting);

console.log(greetingStart + nameUser);
14 changes: 14 additions & 0 deletions week-1/InClass/exercise-F.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const numberOfStudents = 15;

const numberofMentors = 8;

const totalNumberOfClass = numberOfStudents + numberofMentors;


console.log(`Number of students: ${numberOfStudents}.`);

console.log(`Number of mentors: ${numberofMentors}.`);

console.log(`Total number of students and mentors: ${numberOfStudents + numberofMentors}.`);

console.log('Total number of students and mentors:' + totalNumberOfClass );
13 changes: 13 additions & 0 deletions week-1/InClass/exercise-G.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const numberOfStudents = 15;

const numberofMentors = 8;

const totalNumberOfClass = numberOfStudents + numberofMentors;

const percentageOfStudents = (100 * numberOfStudents) /totalNumberOfClass;

const percentageOfMentors = (100 * numberofMentors) / totalNumberOfClass;

console.log("Percentage students: " + Math.round(percentageOfStudents) + "%");

console.log("Percentage mentors: " + Math.round(percentageOfMentors) + "%");
22 changes: 22 additions & 0 deletions week-1/InClass/exercise-H.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
function numbers (num1, num2){
return num1 + num2;
}

// The function it get the num1 and add numb2

const randomNumbers = numbers(5, 10)

console.log(randomNumbers)

/* What's the difference between a return and console.log?

- A return statement ends the execution of a function, and returns control to the calling function.
Execution resumes in the calling function at the point immediately following the call.
A return statement can return a value to the calling function.
- console.log - prints the result on the screen

When would you choose to use functions over the way we have been scripting so far?

-We choose the functions ( is a kind of block of codes)when we need to execute it repetitive times, so we do not need to write every single line and let the function do the job after giving it the correcter parameters.

*/
18 changes: 18 additions & 0 deletions week-1/InClass/exercise-I.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const year = 2022 // global variable

function returnBornDate(yearsOld){
return year - yearsOld;
}

console.log(returnBornDate(34)); // prints 1988

//Second part of the excercise:

function greetings(name, age){
return ` Hello, my name is ${name} and I've born in ${returnBornDate(age)}.`
// };
}

console.log(greetings("Cristiane", 34)); // prints: Hello, my name is Cristiane and I've born in 1988.


5 changes: 5 additions & 0 deletions week-1/InClass/practica.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const max = 19;
const min =1;

console.log(Math.floor(Math.random() * (max - min + 1) +1));

6 changes: 3 additions & 3 deletions week-2/Homework/C-comparison-operators/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@

var studentCount = 16;
var mentorCount = 9;
var moreStudentsThanMentors; // finish this statement
var moreStudentsThanMentors = studentCount > mentorCount;// finish this statement

var roomMaxCapacity = 25;
var enoughSpaceInRoom; // finish this statement
var enoughSpaceInRoom = roomMaxCapacity >= (studentCount + mentorCount);// finish this statement

var personA = "Daniel";
var personB = "Irina";
var sameName; // finish this statement
var sameName = personA === personB; // finish this statement

/*
DO NOT EDIT BELOW THIS LINE
Expand Down
9 changes: 9 additions & 0 deletions week-2/Homework/E-conditionals/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@
var name = "Daniel";
var danielsRole = "mentor";

if(danielsRole === "mentor"){
console.log("Hi, I'm " + name + ", I'm a mentor.")
} else {
console.log("Hi, I'm " + name + ", I'm a student.")
}

/*

Prints:

EXPECTED RESULT
---------------
Hi, I'm Daniel, I'm a mentor.
Expand Down
8 changes: 4 additions & 4 deletions week-2/Homework/F-logical-operators/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ var cssLevel = 4;

// Finish the statement to check whether HTML, CSS knowledge are above 5
// (hint: use the comparison operator from before)
var htmlLevelAbove5;
var cssLevelAbove5;
var htmlLevelAbove5 = htmlLevel > 5;
var cssLevelAbove5 = cssLevel > 5;

// Finish the next two statement
// Use the previous variables and logical operators
// Do not "hardcode" the answers
var cssAndHtmlAbove5;
var cssOrHtmlAbove5;
var cssAndHtmlAbove5 = htmlLevelAbove5 && cssLevelAbove5;
var cssOrHtmlAbove5 = htmlLevelAbove5 || cssLevelAbove5;

/*
DO NOT EDIT BELOW THIS LINE
Expand Down
22 changes: 21 additions & 1 deletion week-2/Homework/F-logical-operators/exercise2.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,27 @@
Update the code so that you get the expected result.
*/

function isNegative() {}
function isNegative(number) {
return number < 0
}
function isBetween5and10(number){
return number >= 5 && number <=10
}

//nombre corto es hasta 6 caracteres?

function isShortName(person){
let nameLength = person.length;
return nameLength <= 6
}

function startsWithD(personName){
let firstCharacter = personName[0]
return firstCharacter === "D"

}



/*
DO NOT EDIT BELOW THIS LINE
Expand Down
4 changes: 3 additions & 1 deletion week-2/Homework/G-conditionals-2/exercise-1.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
*/

function negativeOrPositive(number) {

if (number >= 0){
return "positive"
} return "negative"
}

/*
Expand Down
Loading