0
JS problem
Hello, how can I change both "text" variables so that the result shows "hello" instead of "hi"? Thanks. https://code.sololearn.com/W02PpUXJU63P/?ref=app
4 odpowiedzi
+ 4
**🇦🇪|🇦🇪** ,JonySVK ,
You can change the string by using u the `replace()` method..
According to your code...
the `replace()` method replaces the first occurrence of 'hi(replace valve)' with 'hello(your string)'
See this modified version of your code.
https://code.sololearn.com/WXyLHQ45m2hP/?ref=app
0
I didn't get your point,
var text = 'hello'
var text1='hello'
console.log(text,text1)
0
I am asking that if I put var = text 'hello hello hi hello' how can I achieve that when I put console.log(text), then it writes "hello hello hello hello" to the console?
0
Darpan kesharwani🇮🇳 Thank tou very much.