I decided to start learning Javascript by doing, so I set myself the goal to recode my arcade C++ game FLTrator, which uses FLTK to Javascript.
The HTML5 canvas API is very similar to the basic drawing routines of FLTK, which made the conversion generally straightforward.
I am using and mixing all ECMA script standards up to ES6 here in one program, because it lets me stay close to C++. My resources have only been the Mozilla Canvas API and my favourite search engine..
But please don't use this program to learn Javascript - it will probably considered as 'using strange practices' by experienced Javascript programmers...
Tested with Firefox 59 and Chromium browser 65 (must be started with
--allow-file-access-from-files
when running locally).
NOTE: The 'Original' has been transcoded faithfully, but not identical and not completely. The goal was only to prove that it can be done. As this goal has been reached, I don't feel motivated enough to port all aspects.
Try this game here: Play JScriptrator in your browser