JavaScript Problem: Combining Arrays and Removing Duplicate Values

preview_player
Показать описание
In this tutorial we will look at a simplified process for combining arrays and removing any duplicate values. We also discuss why this doesn't work as smoothly if objects are the values in the array.

For more resources on JavaScript:

Courses offered on Udemy: Getting Started or Advanced Topics at a huge discount:

New Mastering Regular Expressions in JavaScript:

Tutorials referred to in this video:

#javascript #AllThingsJavaScriptLLC
Рекомендации по теме
Комментарии
Автор

You are making amazing javascript tutorials, I love the way you explain everything in simplest and clearest terms. Thank you.

rotrose
Автор

I really appreciate these tutorials, thanks a lot for the effort you put into them!

GILGAMESH
Автор

helped me clarify objects reference type. Nice clear desription :)

hughslooskant
Автор

Nice solution with the spread operator! I see a lot of katas on codewars that require this sort of thing.

MecchaKakkoi
Автор

I was literally like an ape trying out thousands of possible functions, until I hit this magnificent video and immediately something lit up in me. Thank You for this useful content :D
(I was stuck using reduce ())

momonkha
Автор

Hello, are [].concat(array1, array2) and array1.concat(array2) different?

stsbmu
Автор

What I have to do if want to get a new array with [Mary, Anna] ?

sebastian.otalora
Автор

looking forward to the next tutorial on comparison objects or array of objects . I was able to solve my array problem by using a filter (stole from stackoverflow)
I find it way to complicated to read, but it does work, the new filteredArray does not have duplicate properties that match the element.name

Could you do a tutorial on findIndex and find?

const filteredArray = totalArray.filter((element, index, array) => {
return (index === array.findIndex(function(t) {
return t.name === element.name;
})
);
});

rickyu
Автор

This video is under the regular expression playlist.
But in complete video,
No single use of regular expression.

Pls make sure that, playlist should contain related videos.

MoT-MasterOfThings
Автор

but why
console.log(typeof set);
console.log(typeof newArr);


are Object?

MsAnnaBs
join shbcf.ru