Tools | Bookmark & Share | Make MrWhy My Homepage
MrWhy.com
Go
MrWhy.com » Videos » CoffeeScript: The Cool Parts
CoffeeScript: The Cool Parts
CoffeeScript: The Cool Parts
Report
CoffeeScript: The Cool Parts
CoffeeScript offers more than nice syntax for setting and managing data and functions. It also offers Classes, Inheritance, access to a 'super' method, Ruby-style string interpolation, easy variable and function bindings, and chained comparisons.  Here’s the code I showed in the video: class Vehicle constructor: (@name) -> move: (miles) -> console.log @name + " drove " + miles + " miles." class VWBug extends Vehicle move: -> console.log "Cruisin'..." super 100 class Truck extends Vehicle move: -> console.log "Haulin'..." super 50 mater = new Truck "Mater" herbie = new VWBug "Herbie" mater.move() herbie.move() a1c = "7.6" healthy = 7.0 > a1c > 5.0 console.log "A1C within healthy range: #{a1c}" Account = (customer, cart) -> @customer = customer @cart = cart $('.shopping_cart').click (event) => @customer.purchase @cart If you're new to CoffeeScript, make sure you check out the CoffeeScript Cookbook and CoffeeScript Basics. Download 150.3 MB Download (iPod & iPhone) 87.1 MB
Channel: iTunes
Category: Technology
Video Length: 0
Date Found: May 30, 2011
Date Produced: May 12, 2011
View Count: 0
 
MrWhy.com Special Offers
1
2
3
4
5
 
About Us: About MrWhy.com | Advertise on MrWhy.com | Contact MrWhy.com | Privacy Policy | MrWhy.com Partners
Answers: Questions and Answers | Browse by Category
Comparison Shopping: Comparison Shopping | Browse by Category | Top Searches
Shop eBay: Shop eBay | Browse by Category
Shop Amazon: Shop Amazon | Browse by Category
Videos: Video Search | Browse by Category
Web Search: Web Search | Browse by Searches
Copyright © 2011 MrWhy.com. All rights reserved.