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!

Commentshotnewtop
theangryepicbanana (1398)

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 (1398)

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

THEJOEMAN23 (16)

It would be
Print(‘hello world’)