welsonjs/helloworld.coffee

29 lines
500 B
CoffeeScript
Raw Permalink Normal View History

2022-11-28 17:38:11 +00:00
fortune = require "lib/fortune.coffee"
2022-11-28 14:32:21 +00:00
song = ["do", "re", "mi", "fa", "so"]
singers = {Jagger: "Rock", Elvis: "Roll"}
bitlist = [
1, 0, 1
0, 0, 1
1, 1, 0
]
kids =
brother:
name: "Max"
age: 11
sister:
name: "Ida"
age: 9
2022-11-28 14:38:47 +00:00
main = (args) ->
console.log song.join(',')
2022-11-28 15:03:42 +00:00
console.log JSON.stringify(singers)
2022-11-28 14:38:47 +00:00
console.log bitlist.join(',')
2022-11-28 15:03:42 +00:00
console.log JSON.stringify(kids)
2022-11-28 14:38:47 +00:00
console.log "Hello world, CoffeeScript"
2022-11-29 05:42:34 +00:00
fortune.sayFortune("foutune!")
2022-11-28 14:38:47 +00:00
exports.main = main