- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
There is no in-built function to replace all occurrences of word. You need to create your own function.
Let’s say the following is our string −
Following is the code −
To run the above program, use the following command −
Here, my file name is demo240.js.
The output is as follows −
- What is the replacement of lodash pluck() method?
- DoubleStream filter() method in Java
- LongStream filter() method in Java
- IntStream filter() method in Java
- Replacement Cost – Correct method of replacing an existing asset
- How to make a method deprecated in C#?