And for mobile you can use sololearn always it's good but somthing is not here it's all problem of any editor in mobile...
As as simple code editor I was always a fan of Notepad++ with its plugins but since the launch of Visual Studio Code I can only recommend it.
You want an app that at least highlights the syntax for you, that will help reduce typing errors.
If you're building more complex code which relies on external libraries I'd suggest Visual Studio Community instead which is a whole IDE.
I'd say just start with VSCode and install debugger from chrome plugin which runs your app on the browser so you can see what it does.
I'm a complete newb, first week learning, but I've found compilers on the Android market that test code for free. I use it on my phone. It's a bit advanced for me, because I'm at "hello world" and still don't know what the heck I'm doing, but maybe it will help to take a look at them