+ 1
What function do you use to replace all letters?
I used âHay!â.replace(âaâ,âeâ) But if I added more, it would only replace first a. Can you figure out a method/function to replace or âaââs
3 RĂ©ponses
+ 3
"Hay!".replace(/a/g, "e")
+ 2
Use escape character "\"
"Dami's brother says hi".replace(/\'/g, "â")
0
How would you replace characters like this? (â and â and ` )
Would you use this?
âDamiâs brother says hiâ.replace(/â â/g,ââ)?