我尝试将此 .coffee 文件编译为 .js,但它给了我错误:
In projekt.coffee, Parse error on line 122: Unexpected '='
这是具体部分:
#line122 -># quotes = ["The people who were trying to make this world worse are not taking the day off. Why should I? <br> -Bob Marley", "Don't worry about a thing, every little thing is gonna be alright<br> -Bob Marley", "Better to die fighting for freedom then be a prisoner all the days of your life.<br> -Bob Marley", "Herb is the healing of a nation, alcohol is the destruction of mankind<br> -Bob Marley", "When you smoke the herb, it reveals you to yourself.<br> -Bob Marley", "My music fights against the system that teaches to live and die.<br> -Bob Marley"]
quoteNumber = Math.floor(Math.random() * quotes.length)
$('#cytat').html '<p> #{quotes[quoteNumber]} <p>'.css
font-family : Finger Paint
这里是整个代码:
我真的不知道发生了什么,因为它告诉我'='是出乎意料的,但它清楚地定义了一个数组。帮助...