Skip to content

Instantly share code, notes, and snippets.

@georgeOsdDev
Created August 23, 2012 01:59
Show Gist options
  • Save georgeOsdDev/3431249 to your computer and use it in GitHub Desktop.
Save georgeOsdDev/3431249 to your computer and use it in GitHub Desktop.
FizzBuzz
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width" />
<title>$title</title>
$styles
</head>
<body>
<h1>$title</h1>
<pre>
console.log "FizzBuzz Start"
fizzbuzz = (x) ->
if x%15 is 0
console.log "fizzbuzz!!"
else if x%3 is 0
console.log "fizz"
else if x%5 is 0
console.log "buzz"
else
console.log x
fizzbuzz i for i in [1..100]
</pre>
$scripts
</body>
</html>
console.log "FizzBuzz Start"
fizzbuzz = (x) ->
if x%15 is 0
console.log "fizzbuzz!!"
else if x%3 is 0
console.log "fizz"
else if x%5 is 0
console.log "buzz"
else
console.log x
fizzbuzz i for i in [1..100]
body {
background: #eee;
}
@georgeOsdDev
Copy link
Author

FizzBuzz CoffeeScript

Created with CoffeeScript at Once

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment