Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9246379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:28:24+00:00 2026-06-18T09:28:24+00:00

I try to compile this .coffee file into .js, but it gives me error:

  • 0

I try to compile this .coffee file into .js, but it gives me error:

In projekt.coffee, Parse error on line 122: Unexpected '='

here is the specific part:

#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

ande here the whole code:

http://jsfiddle.net/BNMa7/

i dont really know whats going on since it tells me that ‘=’ is unexpected, but it clearly defines an array. help…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:28:25+00:00Added an answer on June 18, 2026 at 9:28 am

    There are multiple problems with this that we should address before the syntax error you’re describing.

    font-family is not a valid stand-alone key. You need to quote that in order to compile it correctly. Same with Finger Paint — I don’t know what’s up with that.

    String interpolation doesn’t work with single quoted strings. You need to use double quotes if you want #{quotes[quoteNumber]} to be replaced with the quote at that index.

    With these fixed, we still have a big problem with operator precedence:

    $('#cytat').html "<p> #{quotes[quoteNumber]} <p>".css 
        'font-family': 'Finger Paint'
    

    That’s equivalent to:

    $('#cytat').html("<p> #{quotes[quoteNumber]} <p>".css('font-family': 'Finger Paint'));
    

    Which is probably not what you meant, since strings don’t have a .css() method. Add parens around the .html() call to get it to the correct meaning:

    $('#cytat').html("<p> #{quotes[quoteNumber]} <p>").css
        'font-family': 'Finger Paint'
    

    Now, finally, the syntax error. At first glance, this appears to be perfectly valid code, and the error message isnt’ very helpful… but this code has a fatal mistake. Do you see it? There’s nothing wrong with the sample you posted; this is only wrong in the context of the rest of the file. So what is it?

    You’ve mixed tabs and spaces. Never mix tabs and spaces. The CoffeeScript compiler is apparently using a different tab width than your editor, so it freaks out, and gives you a crazy error message.

    Consider using a text editor that will automatically translate tabs into (a consistent number of) spaces, or at the very least one that allows you to view invisible characters. I like Sublime Text, but there are plenty of options out there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I try to compile my coffeescript file with grunt using the grunt-contrib-coffee plugin. But
Every time I try to compile this (error on line 110) #include <iostream> std::string
When I try to compile this project I get the following error. I would
I'm getting a nothing to repeat error when I try to compile this: search
When I try compile with maven 3.0.4, Eclipse give me this error: Failed to
When I try to compile this I get this error: error: expected `;' before
When I try and compile this code, I get this error. Error 1 The
When I try and compile this code (VS2010) I am getting the following error:
I'm getting a strange error when I try to compile this: class CucumberMarket {
I get the above error when I try to compile this simple program: /*

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.