+ 7
[SOLVED] Why replaceAll method does not work on SL
recently i will working in js on sl but if i use replaceAll method in js on sl its showes error in console but if i run replaceAll method on browser (Chrome 85 or above) it will work fine
31 Réponses
+ 3
Ruba Kh Sumit Programmer😎😎
Try this link:
https://play.google.com/store/apps/details?id=com.google.android.webview
I'm not responsible for any harm this could cause.
If that doesn't work then sorry, I'm unable to help.
+ 10
+ 10
Sumit Programmer😎😎 buddy
Try with this one👍
• 3 Ways To Replace All String Occurrences in JavaScript — https://dmitripavlutin.com/replace-all-string-occurrences-javascript/
+ 8
https://code.sololearn.com/WfdxW1yyEtVU/?ref=app
+ 7
Works fine for me
+ 6
I tried it now It did not work for me too
+ 5
Danijel Ivanović ODLNT I alredy search in googel but i did not get my answer
+ 5
Sumit Programmer😎😎
Please don't make us guess until we luck out on why your code doesn't work. If you genuinely want help, provide a link to your Code Bit so we can troubleshoot properly.
+ 3
Sumit Programmer😎😎 it is showing Chrome 86 when checking from sololearn which is latest version but when I went to other sites they showed me 44 😐
+ 3
Danijel Ivanović thanks for giving me another way to achive this but still i want to know why replaceAll method does not work on most of the user in sl like Ruba Kh
+ 3
Janning⭐
Here is the problem
If i use replaceAll method in SL App as you see he says replaceAll method not a function if you have any explanation about it plz explain me.
Here is the error pic
https://www.sololearn.com/post/666331/?ref=app
Here is the code
Maybe this code work in your device but in my case its not work
https://code.sololearn.com/WuPEPl6ZLGEC/?ref=app
+ 3
Sumit Programmer😎😎
I ran your revised code and it worked fine for me.
Maybe bug report to info@sololearn.com?
I've posted a screenshot in my feed for you to attach to your bug report, if you choose to submit one.
https://www.sololearn.com/post/666375/?ref=app
I hope this helps!
+ 3
This is not a failure on SoloLearn's end. SoloLearn uses your phone's webview to run web codes on client side. replaceAll is a relatively new feature, actually it is not even part of the standard yet (waiting for ES2021) as per the link (tc39) shared by Danijel Ivanović. So the only way to fix this is to update your phone's webview, full OS upgrade might be required. You can check the compatibility table at MDN (link shared by Danijel) in order to understand what version is required.
+ 3
I already mention in my qustion and i already reads doce of mdn before danijel shares after that i run this code in chrome 85 or above and it will work fine but in sl its produce error. And for your info i have android 10
+ 3
No worries, mate. Did it resolve for Ruba Kh as well?
+ 3
No need to say sorry
+ 2
Abhay whats your chrome browser version
+ 2
Ruba Kh whats your browser version