JavaScript Problem: Replace All Occurrences of a String

preview_player
Показать описание
Most people are aware of how you can replace a character or word in a string using the replace method. However, what if you want to replace all occurrences in that string? In this tutorial we are going to look at that JavaScript problem.

Would you like to help keep this channel going?

Courses on my site:

Tutorials referred to in this video:

For more resources on JavaScript:

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

Hell Yeah. i just completed my first KATA on code wars. after much time. thanks a bunch...

joewatson
Автор

solid tutorial, very clearly & easily u explained.

saurabrakshit
Автор

excellent tutorial, i did not even know split can take regex

shabnamnaaz
Автор

thanks bro it is very helpful thanks a lot!

techcoder
Автор

This is helpful, but how would you extend this into removing all instances of specific text seen within an array of objects? Could you please show an example of removing different bits of text/string from within an array of objects? Example [{ page: { results: [{ title: 'keep thisA - textI dont want' }, {keep this B - difftextI dont want}, {keep C this - diffdifftextI dont want} ]}}]

keithvaneaton
Автор

Hello sir, can you replace two different strings at once ?

investmentbros
Автор

can u make tutorial on "How to find index number of all occurrence of a particular character in a string ? in JavaScript"

saurabrakshit
Автор

What if you want to replace a few words?

Dnaliaht