JavaScript Tutorial: Removing a specific element from an array | JavaScript Basics, Learn JavaScript

preview_player
Показать описание
Have you ever been stuck trying to remove a specific item from an array? In this video, we're going to talk about how to remove a specific element from an array using Javascript’s native array methods: Splice and Filter, and how to handle duplicates.

0:27 - Method 1: Splice
1:15 - ES6 arrow function syntax to avoid mutating the original array
3:06 - Method 2: Filter
3:55 - Key takeaways

----
Codementor is a platform where you can connect with vetted mentors for 1:1 live programming mentorship, debugging, code review, and more! As long as it's programming related, our mentors can help you.

👋 Come find us on social

#Developer #Programming #JavaScript
Рекомендации по теме
Комментарии
Автор

Clear, concise, and does the job. Thank you so much!

kingnehmna
Автор

Charming tutorial from a charming tutor. Life is good.
Thank you.

iliashterev
Автор

your really cool thank you so much for your knowledge sharing to us😊

marimuthur
Автор

Funnily enough, this wasn't what I was looking for; BUT, I'm so glad I saw it because I've just learned something new and helped me with the logic around something else I'm working on. Thank you. Anyway, I'm sure I'll be using something like this at some point so I'm keeping it in my web-dev tutorials playlist.

TinyMaths
Автор

Thank you it's shown and explained in very useful way , I code in many programming languages but can I ask you please for how to save files using purely javascript without using fetch method, I mean I want to save data into a file on local host offline from javascript without the need to an api, I usually search information on YouTube or Google but until now didn't find what satisfy what I want, thank you in advance

ahmadmaihraize
Автор

That was really helpful. I created a prototype so you can do that but just the
Array.prototype.removeItem = function (item) {
let bufferArray = this;
var index = => element == item);

if (index !== -1) bufferArray.splice(index, 1);

return bufferArray;
}

knifeslasher
Автор

This is the kind of video that i most love on coding area of Youtube, keep doind this great work!

zagoguic
Автор

Thank you so much it was absolutly lovely and useful !👍🇬🇧

peasfulwarrior
Автор

lady u saved my ass, i'm in love

JulioCesar-hhwq
Автор

Super.. can u please make more tips and tricks like this..

Very useful stuff..

MrRajeshwarreddy
Автор

with buttons, and show in html not in console pliss

auliazatira
Автор

this is just what i need <3 <3 <3 <3 <3

articktoth
Автор

it's not for begginers, what the hell is that?

josesuch