One of the problems I had in the past with building JavaScript solutions was the lack of support for modules. Of course you could solve this by adding RequireJS or CommonJS javascript libraries.

The biggest question I had was 'how to build code' ?

Then Microsoft came up with TypeScript announced by C# hero Anders Hejlsberg.
At first I was quite sceptical because I thought this was just going to be another CoffeeScript or even Google Dart.

After playing around with it I think it's rather nice. Basically TypeScript is just a superset of javascript (and not some cross compiler) adding Ecmascript 6 language elements to the current Ecmascript 5/Javascript standard.
So in short; you can start using interfaces, classes and static typing in javascript projects already and the TypeScript compiler will take care of converting it in Javascript you can use in current browsers and node.js. On top of that it will also handle modules, it's completely open source and there is a brilliant Visual Studio 2012 plugin.

One downside: it's in pre-alpha / preview state so no guarantees on how long it will be supported or actively developed. But I think you should at least have a look at it to see for yourself if you would use it in your project.

I know I will.

More links on typescript: