Share your repls and programming experiences

← Back to all posts
Please help!
BenWheatley1 (0)

I found coffeescript on repl and wanted to give it a go.
I wanted to try and get a "Hello World!" program going, but I'm having a bit of trouble.
Please help!

theangryepicbanana (1629)

You don't need that function thingy. Just do

first_word = "Hello"
both_words = "#{first_word} World!"
BenWheatley1 (0)

@theangryepicbanana Thanks! It works now, I don't really understand why though...
this looks to me like I'm declaring and assigning to 2 variables.

theangryepicbanana (1629)

@BenWheatley1 well coffeescript is quite different from JavaScript, so instead of having to do var myVar = value; you can just do myVar = value.

VMTU (36)

You can do
console.log "Hello, world!"
and that'll do it.


It would be
Print(‘hello world’)