Proposal: Add javascript stuff from whitehall styleguide

Some thought has gone into javascript style in the Whitehall team. I'm thinking this might be useful here.