PLDB
Languages Features Calendar About Lists Add Language
GitHub icon

CoffeeScript

CoffeeScript

CoffeeScript is a programming language created in 2009 by Jeremy Ashkenas.

CoffeeScript is a programming language that transcompiles to JavaScript. It adds syntactic sugar inspired by Ruby, Python and Haskell in an effort to enhance JavaScript's brevity and readability. Specific additional features include list comprehension and pattern matching. Read more on Wikipedia...

Try now: Riju ยท TIO ยท Replit

#51on PLDB 13Years Old 23.3kUsers

Example code from Riju:

console.log "Hello, world!"

Example code from hello-world:

alert "Hello World"

Example code from the Hello World Collection:

// Hello world in CoffeeScript alert "Hello, World!"

Example code from Linguist:

console.log "Hello, World!"

Example code from Wikipedia:

author = "Wittgenstein" quote = "A picture is a fact. -- #{ author }" sentence = "#{ 22 / 7 } is a decent approximation of ฯ€"

Keywords in CoffeeScript

and or is isnt not on yes @ no off true false null this new delete typeof in instanceof return throw break continue debugger if else switch for while do try catch finally class extends super undefined then unless until loop of by when

Language features

Feature Supported Example Token
Integers โœ“
# [0-9]+
Floats โœ“
# [0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?
Hexadecimals โœ“
# 0x[0-9a-fA-F]+
Conditionals โœ“
Inheritance โœ“
Switch Statements โœ“
Exceptions โœ“
Classes โœ“
While Loops โœ“
Booleans โœ“ true false
Regular Expression Syntax Sugar โœ“
Strings โœ“ "
MultiLine Comments โœ“
### A comment
###
###
Print() Debugging โœ“ console.log
Line Comments โœ“
# A comment
#
Semantic Indentation โœ“
Comments โœ“

Trending CoffeeScript repos on GitHub

repo stars description
cypress 14465 "Fast easy and reliable testing for anything that runs in a browser."
trix 13950 A rich text editor for everyday writing
codecombat 6869 Game for learning how to code.
overleaf 5599 A web-based collaborative LaTeX editor
SwitchyOmega 13272 Manage and switch between multiple proxies quickly & easily.
vimium 11430 The hacker's browser.

Books about CoffeeScript on goodreads

title author year reviews ratings rating
Programming in CoffeeScript (Developer's Library) Mark Bates 2012 2 22 3.50
Coffeescript Programming with Jquery, Rails, and Node.Js Michael Erasmus 2012 2 10 3.50
Programming in Coffeescript Mark Bates 2012 0 0 0.0
Programming in Coffeescript Mark Bates 2012 0 0 0.0

Article source

PLDB - Build the next great programming language. v5.0.0 - Acknowledgements ยท Email ยท GitHub