If I open up a REPL with Coffeescript 1.3.3 and type:
y ?= 5
or
y = 5
y ||= 6
I get an an error that y isn’t defined… For compiling the last one works, but the first still errors.. Is this expected?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is because each evaluation involves separate compilation. The workaround is to access it as a property of the global object.