I saw some links to JSFiddle, but here's one that's maybe a little better (software-wise): Khan Academy [0]. It uses JavaScript, and they've added ProcessingJS wrappers so you don't have to use raw canvas API. They also have instructional videos and other content. It's also gamified. [1]
[0] https://www.khanacademy.org/computer-programming/new/pjs
[1] https://www.khanacademy.org/computing