If you're interested in this sort of code editing with live feedback of results, checkout Choc http://www.fullstack.io/choc/ - a project we worked on earlier this year.
You can use vanilla javascript, step through the execution of each line of code, get a human readable description of what the line is doing, scrub constants, etc.
There's even a minecraft-like demo building a tower in voxel.js.