Skip to content

Changed exercise 4-3 wording #148

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

Closed
wants to merge 2 commits into from
Closed
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .learn/resets/01-Hello_World/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// console log hello world here
8 changes: 8 additions & 0 deletions .learn/resets/02.1-Access_and_retrieve/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Declaring the array
let myArray = ['sunday','monday','tuesday','wednesday','thursday','friday','saturday'];

// 1. print the 3rd item here

// 2. change the 'thursday' value to null here

// 3. print the position of step 2
3 changes: 3 additions & 0 deletions .learn/resets/02.2-Retrieve_Items/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
let arr = [4,5,734,43,45,100,4,56,23,67,23,58,45,3,100,4,56,23];

// your code here
10 changes: 10 additions & 0 deletions .learn/resets/03-Print_the_last_one/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
function generateRandomArray()
{
let auxArray = [];
let randomLength = Math.floor(Math.random()*100);
for(let i = 0; i < randomLength; i++) auxArray.push(Math.floor(Math.random()*100));
return auxArray;
}
let myStupidArray = generateRandomArray();

// Your code here
4 changes: 4 additions & 0 deletions .learn/resets/04.1-Loop_from_one_to_seventeen/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Change the conditions of the for loop
for(let number = 0; number < 10; number++) {
// Print the number
}
1 change: 1 addition & 0 deletions .learn/resets/04.2-Loop_from_seven_to_twelve/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Your code here
5 changes: 5 additions & 0 deletions .learn/resets/04.3-Add_items_to_array/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
let arr = [4,5,734,43,45];

// Your code here, use the push() function and the 2 Math functions

console.log(arr);
2 changes: 1 addition & 1 deletion exercises/04.3-Add_items_to_array/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ tutorial: https://www.youtube.com/watch?v=LMOIly1JTes

## 💡 Hints:

+ You can use the `Math.random()` and `Math.floor()` functions to get random numbers.
+ You can use the Math.random() function to generate random numbers, and then use the Math.floor() function to round them down to the nearest integer.

+ You have to use the `.push()` function to add the new random numbers to the array.
Loading