Skip to content

Instantly share code, notes, and snippets.

View victorsferreira's full-sized avatar
🇻🇦

Victor Ferreira victorsferreira

🇻🇦
  • Rio de Janeiro, Brazil
View GitHub Profile
@victorsferreira
victorsferreira / find_and_replace.js
Created February 1, 2018 03:42
Find and replace for all programming languages
//Concept: split the string with the word or character you want to remove
// and join the parts with the word or character you want to replace with
var someString = "spam spam spam spam spam spam spam and some more spam";
var newString = someString.split('spam').join('javascript'); // "javascript javascript javascript javascript javascript javascript javascript and some more javascript"