It sounds like you're on the right track, but the massive DOM API can be rather daunting for a beginner, so let me see if I can help you out. As others have suggested, getting acquainted with the JavaScript language itself should be your first step.
I believe the most important line in your question is right here:
what software can I use test my code in real time
Nowadays Firefox's built-in web console is really powerful, and exactly what you need. Open it with Ctrl+Shift+K. For now just focus on the JavaScript console and element inspector tabs — they will show you exactly what's going on with your code and with the HTML.
Take a look at this screenshot of the JS console and I'll point out some of the useful features:

The text bar at the bottom is where you can enter code and see the results in the log above. Notice that as I'm typing document.body.get…
, the console will show a list of all properties of the document.body
object that begin with 'get'.
In the log you can see I've previously entered document.querySelector("div")
, and it printed the resulting object: the first <div>
element on the page. If you click on that line in the console, the panel on the right-hand side opens showing you all the properties of that object and their values. If you click on the white square thing in the log it'll point out exactly where in the document tree that element exists.
So, play around in the console; experiment; search property names in https://devdocs.io or google if you're wondering what they mean. This should help you learn your way around the DOM API. If you have some more specific questions about JavaScript that you can't find the answer to, I'd suggest asking on a JavaScript forum or IRC channel for helping novices — perhaps https://www.reddit.com/r/learnjavascript or https://chat.stackoverflow.com/rooms/17/javascriptball-pit. Or just leave a comment here, I'll see it. Good luck!