+ 3

Why isn't this code working?

I tried to write a code where a svg circle's radius is changed using javascript but it did not work. Any help would be greatly appreciated. https://code.sololearn.com/WeT12Yxt7vv1/?ref=app

5th Jan 2020, 8:06 AM
🇲​🇴​🇭​🇦​🇲​🇲​🇦​🇩​ 🇯​🇮​🇱​🇦​🇳​
🇲​🇴​🇭​🇦​🇲​🇲​🇦​🇩​ 🇯​🇮​🇱​🇦​🇳​ - avatar
2 Respostas
+ 6
Mohammad change this line 12: b['r']="30"; by this: b.setAttribute('r',30); alternative solution : b.style['r']="30"; or b.style.r="30"; You may omit quotation marks of value if you don't need to include units. Default unit would be pixels.
5th Jan 2020, 8:18 AM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar
+ 2
Omkar thanks a lot... it worked
5th Jan 2020, 8:48 AM
🇲​🇴​🇭​🇦​🇲​🇲​🇦​🇩​ 🇯​🇮​🇱​🇦​🇳​
🇲​🇴​🇭​🇦​🇲​🇲​🇦​🇩​ 🇯​🇮​🇱​🇦​🇳​ - avatar