js2js: Why So Serious?

Victor Haydin
Head of Products and Services at ELEKS

JavaScript is the Assembly of the Web. There are dozens of tools that compile some programming language to JavaScript. You can do it with C++, Java, C#, Python, Ruby or plenty of other languages. It seems that there’s one language that remains to be covered for JavaScript to dominate the world: JavaScript itself.

Last week we were joking about this and decided to fix this situation. Meet js2js, a revolutionary open-source compiler that transforms JavaScript directly to JavaScript! Have fun!



  • javascript to javascript ??? what does that mean? example?

  • var example = ‘why so serious?’;

    compiles to:

    var example = ‘why so serious?’;

  • The 1.0 release should be scheduled for April 1, 2014…

  • Js2JsCompiler.prototype.compileCode = function(code) {
    return code; // as we need to compile javascript to javascript, we do nothing here :)


  • Do not understand, what is that?

  • Can you explain a little bit more elaborately as to what this “js2js” compiler does?


  • The best compiler I have ever seen, in the spirit of “the smaller, the better” and “what is not, cannot definitely be broken”

  • What are its benefits to javascript developers?

  • What about js2js as a Service?

  • lol

  • OK so this _IS_ a joke.. you went so far as to actually write some code?

  • This is absolutely brilliant! We have been searching for just such a solution for well over a year! Our code has NEVER looked better or run in a more efficient manner. I REALLY wish I could code that well to begin with. THANK YOU!

  • You have our whole office chuckling, well done all!

  • And it isn’t even April 1st!

  • I don’t know witch is funnier :) The Compiler joke or the Reaction of the people in the comments :)

    Why so serious people ? :) You forget how to have fun :P

  • I’ve tried this and it works great! I’ve already increased my efficiency by 200%! Great job!

  • My startup is currently developing this.. but we have way more features.. we have auto-compile, ide integration..

    good work guys

  • Mo

    Compile method is very useful, thanks for the release!!
    Js2Js 4ever!!

  • JM

    Great stuff! We plan to adopt this into our release cycle immediately. Thanks!

  • Good stuff. the funniest compiler in the world….. ;)

  • You do realise this is the first javascript compiler that actually delivers everything it claims to? Revolutionary indeed!

  • You need to port this into a Grunt Task ASAP!

  • Please someone give me a few details about js2js. I cannot understand properly. please help me.

  • Where are the nightly builds ?

  • I thought I can transform legacy code into a well-structed documented oop :D