Yngvarr

Generation

generate functionFri, 13 Jan 2023

replace in string

function replace(s, a, b){ let result = '' for(let i=0; i< s.length; i++){ if(s[i] == a){ s[i] = b } } return result }

Javascript
Generate More

Questions about programming?Chat with your personal AI assistant