Use a Nested Loop to Find Mutual Followers, Nested Loops Explained, Accessing Nested Arrays with JS

Channel:
Subscribers:
7,740
Published on ● Video Link: https://www.youtube.com/watch?v=690gjbnI69c



Duration: 4:53
345 views
9


In this lesson we look at Codecademy's Learn JavaScript lesson, Nested Loops, in this JavaScript tutorial video called, "Use a Nested Loop to Find Mutual Followers, Nested Loops Explained, Accessing Nested Arrays with JS" We learn how to loop through 2 arrays and compare what is in them. We learn that we are able to use a nested for loop to iterate through both of our arrays and compare the contents within both arrays. Whenever the elements within our arrays match, we can push those matching elements to an empty array that we call mutual friends. This lesson tries to teach us the fundamentals of using a nested loop to iterate through list data quickly. We are able to go through all the contents of 2 arrays and compare data found within them, and in this lesson specifically, we are able to find mutual friends and save them to their own array, for later use. Understanding how a nested loop works and when to use a nested loop is an important skill to learn in javascript. Understanding looping through arrays and the fact that the outer loop runs once, then the inner loop will run completely before coming to the next element on the outer loop is a key fundamental to understanding nested loops. A loop inside a loop allows us to check vast lists against each other and allows us to save important data from both lists, as we see necessary. Make sure to understand nested loops before moving on to the next lesson.




Other Videos By We Will Code


2022-03-14How to Use the map Method in JavaScript, Return a New Array with map Method on Codecademy, Iterators
2022-03-14Practice the forEach Method with JavaScript, forEach Explained on Codecademy, Use the forEach Method
2022-03-14Higher-Order Functions JavaScript Review on Codecademy, Tips when Practicing Higher-Order Functions
2022-03-13Functions as Parameters Explained, JavaScript Higher-Order Functions Codecademy Function as Argument
2022-03-12Higher-Order Functions, JavaScript Functions as Data, Codecademy Assign and Reassign Function Data
2022-03-11An Intro to Higher-Order Functions, Codecademy's Learn JavaScript, What are Higher-Order Functions
2022-03-11Codecademy's Learn JavaScript, Loops Section Review Loops, Important Loop Summary, Learn JS 2022 ES6
2022-03-10The break Keyword Explained with JavaScript on Codecademy's Learn JavaScript, break Keyword Practice
2022-03-10Do While Loops Explained with JavaScript, Practice Do While Statements with Codecademy's Learn JS
2022-03-08The While Loop Explained with JavaScript, What is A While Loop in JavaScript, Codecademy's JS Course
2022-03-08Use a Nested Loop to Find Mutual Followers, Nested Loops Explained, Accessing Nested Arrays with JS
2022-03-07Looping Through Arrays Explained, How to Loop through an Array with JavaScript, on Codecademy, Loops
2022-03-07Loop in Reverse Using a for Loop, Learn JavaScript with Codecademy, Looping in Reverse, Loops JS ES6
2022-03-07The For Loop Explained, What is a for Loop in JavaScript, Learn for Loop on Codecademy's Learn JS
2022-03-07Learn JavaScript on Codecademy, Why Repeating Tasks Manually Calls For Loops in Programming, JS ES6
2022-03-05An Intro to Loops in Programming, Loops in JavaScript on Codecademy's Loop Section, What is Iterate
2022-03-04Learn JavaScript, Review Arrays, How JavaScript Arrays Work, Understanding Arrays in JavaScript 2022
2022-03-04Accessing Nested Arrays in JavaScript, Nested Arrays in Arrays Explained, Learn JS on Codecademy,
2022-03-04Arrays in Functions Explained, Understanding Arrays and Functions on Codecademy's Learn JavaScript
2022-03-03More Array Methods Explained in JavaScript on Codecademy, Methods, shift, unshift, slice, indexof
2022-03-03Removing last element in an Array with pop Method in JavaScript, Codecademy's JS Array's pop Method



Tags:
Coding
ES6
JS
JavaScript
Programming
Tutorials