Introduction to Arrays with JavaScript

preview_player
Показать описание
An introduction to the concept of an Array and the basic syntax for adding and removing items from an Array.
Рекомендации по теме
Комментарии
Автор

Your voice is really relaxing to listen to you are like the bob ross of programming

tristansacotte
Автор

Your the best source I've found to teach myself JS. Seriously a gem of a channel over here. Thanks for all your hard work sir!

kenosabi
Автор


This has been messing with me and causing me stress for weeks, and you explained it in just the right way. Thank you.

ryanbooth
Автор

just what I needed, I was building a basic to do list to be run in console, but I had it way too complicated with object constructors for each day of the week (new, this keywords), I deleted it all and went back to basic arrays and your playlist is helping me alot thanks!

EDC.EveryDayCode
Автор

Second round to learn this, feel much better now. Thank you.

rotrose
Автор

Best professor on webdev you are the bomb bro. I taught myself a lot from your an addition. Array pop method also returns a value just like the array shift method. Pop returns the last element that was popped.

abdiag
Автор

mind blowing JavaScript series/thanks from India/hope you will update new series of

digitalmarketerindia
Автор

Smart way of explaining new concepts to beginners. You have my Sub sir.

hhiskgj
Автор

Idk why, but the last part worked for me

froneotm
Автор

for me i want to study js and you have so helpful and have good playlists but i Confounded strat form playlist that called "js from start" or from this specific playlist on "js loops", "js funciotn" ...etc, because i noticed "js from strat videos not orderd .and thank you sir for this effort

blus
Автор

It time for Steve to release a playlist on data structures and algorithms using javascript!! :)

funkybuddha
Автор

Q1. Is there a way to delete an element from the array through a direct reference? (eg: remove 0, 1, 2... or remove "Leia") without having to use .pop each time. Or maybe a way to use .pop with a function? (e.g. pop characters-2 )?

CesarJuarezVargas
Автор

Why does "characters.shift( )" have to be put in a variable in order for the log to display it?
It works for me without

zooneyl
Автор

Hi Steve, I facing issue with array.pop(). I have a array let arr=[1, 2, 3, 8, 3 2, 1], str='';
for (let j of arr){
str=str+arr.pop(j)
}
Expecting output is 1238321
But the actual output is 1238.
I checked many times with different elements also, still seeing same issue. Can you please check.

MohammadMM
Автор

If you would only leave wouldn't that leave you with only LUKE to display? It happened to me. I didn't have to create the rem variable.

CesarJuarezVargas
Автор

What difference would it make if I use as many .pop as needed in order to only display "Luke" versus using .shift once and have it removed from the top of my list (assuming we are working only with the original array from the start)?

CesarJuarezVargas
Автор

I discovered that if I try .unshift [3], it displays a number 3 instead of "Chewie' as I would have expected. You have to retype the value that was deleted. Any shortcut to retyping?

CesarJuarezVargas
Автор

While practicing, I used the shift method to remove the first element in the console.log method and it worked. I am curious why it didn't work in your example.
My code:

let games = [`Assassin's Creed`, `Prince of Persia`, `Far Cry`];
games.push(`Need for Speed`);
console.log(games.shift());

persiansayed
Автор

I love your style. But my question is how can you reverse words with 6 or more letters in a given string after I split to array ? That is 'My second programs code' turn to "My dnoces smargorp". Thank you

ralphdeeney
Автор

Hi Steve! Could you name a context where the unshift would be useful (real-world example)?

erikaperley