Just a few exercises that I came up with while tutoring. The goal is to wrap your head around iterating over arrays as a pre-cursor to learning the...
For further actions, you may consider blocking this person and/or reporting abuse
Some quick solutions
5)
6)
Hi @kauresss ,
thanks for these exercises!!!
I completed all and they help me to understand better Array
P.s I don't if it's error or not , but in eighth exercise there are same name variable ( values2)
You're welcome! And thanks for pointing that out, I've corrected it :)
Hello, can you give link to solutions of this exercises? I don't know if I am doing them correctly
Some solutions (6)
let student1Courses = ['Math', 'English', 'Programming', 'd'];
let student2Courses = ['Geography', 'd', 'Spanish', 'Programming'];
const filterArray = student1Courses.filter(value => student2Courses.includes(value));
function filterArray(){
const diff = [];
for (let i = 0; i < student1Courses.length; i++) {
const val1 = student1Courses[i];
}
filterArray();
Hello Kauress I was wondering if you can give us a link to the solutions to the problems please , I want to make sure that I am doing them correctly, if you can be so kind.
sincerely Roy Frias
Hello Roy, sure I'll put up the solutions soon. I'm finishing a 400+ coding exercises workbook after which I'll get some free time
Ah Ok cool, Thank you so much !!
can you please share solutions
**_
Question 4
_**
var wowDatatypes = ['Scarlaty', 26, true, null, ['Cool']]
wowDatatypes.forEach(differentDataType)
function differentDataType(item, index){
console.log('['+index+']'+ " " +item)
}
**
Question 3
**
var Planets = ['Vênus', 'Marte', 'Mercúrio','Urano','Jupter','Netuno']
Planets.reverse()
Planets.forEach(Interation)
function Interation(item, index){
console.log('['+index+']', item)
}
Solution to 9)
Hi Kauress, I really liked these exercises because they are just what I needed to practice (and force myself to find out how to solve them! ) Could you please share more? Many thanks! ;)
Solution # 3
const Planets = ["mercury", "venus", "earth", "mars", "jupiter"];
Planets.forEach((element,index) => console.log(element,index));
Question 5
let myArr = [ 1, 2, 'One', true];
myArr.filter(passandoPelaArray)
function passandoPelaArray(filtrando){
console.log(filtrando)
}