Arrays in Functions Explained, Understanding Arrays and Functions on Codecademy's Learn JavaScript

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



Duration: 3:51
127 views
5


In this JavaScript lesson, we look at, "Arrays in Functions Explained, Understanding Arrays and Functions on Codecademy's Learn JavaScript". This is from the Arrays section from our Codecademy course. In it, we learn that Arrays that are changed within a function will be updated outside our function. It is important to understand that if you mutate or change your Array within a function, that function will stay changed, or mutated, outside of that function. We see two examples of this. In the first example we have a function that takes our global array, and within the function, changes a value in one of the array's indexes. Once outside of the function, we see our global array was changed also. We then make another function and run the .pop() method on our array and once we are out of the function, we also see that the .pop() method had affected our array outside the function! Understanding Arrays and Functions and how arrays in functions behave is a key part of your programming journey. Make sure to understand how arrays and functions behave with each other by practicing this regularly!




Other Videos By We Will Code


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
2022-03-03Array Push Method Explained with JavaScript on Codecademy, Understanding Array Push Method, JS Guide
2022-03-03Array's Length Property Explained, JavaScript on Codecademy, Count Elements in an Array with length
2022-03-02Difference Between Arrays with let and const in JavaScript, Use let and const with Array, Codecademy
2022-03-02How to Update Elements in an Array with JavaScript, Updating List Items in Arrays on Codecademy
2022-03-02Accessing Elements in an Array with JavaScript, How to Access Elements in an Array on Codecademy JS
2022-03-01How to Create an Array with JavaScript, Creating an Array Explained in Codecademy, What are Arrays
2022-03-01JavaScript Arrays for Beginners, Intro to JavaScript Arrays on Codecademy, Learn Array Manipulation
2022-03-01Codecademy's Learn JavaScript, Review Scope, Blocks, Namespace, Global Variables, Scope Pollution



Tags:
Coding
ES6
JS
JavaScript
Programming
Tutorials