Hacker News new | ask | show | jobs
by ilaksh 4787 days ago
Well, that's not bad, but I think the CoffeeScript is better

    $.get $('#url').val(), (res) -> $('#res').val res.length
Or using LiveScript backcalls is even cooler:

    data <-! $.get '/x.html'
    $ \.res .val data
Or in IcedCoffeeScript if you like 'await'

    await $.get 'documentation/css/docs.css', defer res
    console.log res
Or check out the huge list of languages that compile to JavaScript at http://altjs.org/