+ 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

11th Oct 2020, 7:22 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
31 ответ
+ 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.
13th Oct 2020, 8:00 PM
Kevin ★
11th Oct 2020, 7:55 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 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/
11th Oct 2020, 8:07 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 8
https://code.sololearn.com/WfdxW1yyEtVU/?ref=app
11th Oct 2020, 9:47 PM
Danijel Ivanović
Danijel Ivanović - avatar
+ 7
Works fine for me
11th Oct 2020, 7:37 PM
Abhay
Abhay - avatar
+ 6
I tried it now It did not work for me too
11th Oct 2020, 7:43 PM
Ruba Kh
Ruba Kh - avatar
+ 5
Danijel Ivanović ODLNT I alredy search in googel but i did not get my answer
11th Oct 2020, 8:00 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 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.
13th Oct 2020, 3:29 AM
Janning⭐
Janning⭐ - avatar
+ 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 😐
11th Oct 2020, 8:11 PM
Abhay
Abhay - avatar
+ 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
11th Oct 2020, 8:37 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 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
13th Oct 2020, 4:27 AM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 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!
13th Oct 2020, 4:48 AM
Janning⭐
Janning⭐ - avatar
+ 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.
13th Oct 2020, 5:04 AM
Kevin ★
+ 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
13th Oct 2020, 5:20 AM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 3
Kevin ★ ohh man really you are really helpful i did not recongnize to update webview becz i did not get any notification from playstore i am extreamly sorry for that. And there is no bug in sololearn Janning⭐ sorry.
14th Oct 2020, 1:34 AM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 3
No worries, mate. Did it resolve for Ruba Kh as well?
14th Oct 2020, 2:12 AM
Janning⭐
Janning⭐ - avatar
+ 3
No need to say sorry
14th Oct 2020, 6:00 AM
Kevin ★
+ 2
Abhay whats your chrome browser version
11th Oct 2020, 7:41 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar
+ 2
Ruba Kh whats your browser version
11th Oct 2020, 7:51 PM
Sumit Programmer😎😎
Sumit Programmer😎😎 - avatar