This exercise was a bit tricky. Figured I\'d post my solution to see if anyone did it differently or if there\'s anyone who knows a better way.
I\'m not sure on best pra
You can simplify it using CoffeeScript:
/app/assets/javascripts/microposts.js.coffee
updateCountdown = -> remaining = 140 - jQuery("#micropost_content").val().length jQuery(".countdown").text remaining + " characters remaining" jQuery -> updateCountdown() $("#micropost_content").change updateCountdown $("#micropost_content").keyup updateCountdown
And as mentioned by jonyamo, you don't need to touch the application.js as the //= require_tree .
already does the trick.