Hello everyone!
In this stream, we’re going to continue learning the fundamentals of JavaScript, the programming language used to make web pages interactive.
We will start at 2022-01-11T15:00:00Z → 2022-01-11T16:00:00Z
Here’s where you can watch the stream:
And here’s the lesson we’re going to continue (starting from “finding a remainder in JS”, about 17% is completed):
As always, we’ll end the stream with a Q&A, so bring your questions.
See you there!
Ramón
5 Likes
From lesson 2 around 52:00-52:36min in the video there is an exercise for Arrays (Access Array Data with Indexes. What is the difference between a String Array and an Index array. Please provide an example with possible use cases.
I don’t believe “index” is a type of array, but rather a way to access a value within an array. Ramón often says “position” in the video, but FreeCodeCamp uses “index” as the technical term. The index number is a way to describe where a value can be found within an array.
For example, I can have an array of strings that lists student names:
let students = ["Ashley", "Lindsay", "Ramón"];
There’s many reasons to want to access a particular value in an array, but let’s say I want to generate a greeting for a particular student.
let greeting = "Hello, " + students[0] + "!";
Should return “Hello, Ashley!”. In this case, the students array is a “string array” or array of strings, and the [0] allows me to access the first value within that array. If I wanted to change the greeting to address the next student, I’d only need to change the 0 to a 1. Later on in JavaScript I’m sure we’ll learn how to use loops, which provide a way to use the same greeting but run it several times with a different index value each time.
Hopefully that helps answer what you were wondering. Others can correct me if I’m wrong, I’m learning too!
4 Likes