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 7173363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:48:32+00:00 2026-05-28T15:48:32+00:00

a snippet from a sample: class Animal constructor: (@name) -> the documentation says that

  • 0

a snippet from a sample:


class Animal
  constructor: (@name) ->

the documentation says that @name is a syntactic sugar for this.name. Where does it say that the above function also performs assignment? how? I can see from the generated code that it does, I am just trying to understand the language. why does it perform assignment?

thanks
konstantin

  • 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-05-28T15:48:32+00:00Added an answer on May 28, 2026 at 3:48 pm

    http://arcturo.github.com/library/coffeescript/03_classes.html

    In fact, CoffeeScript provides a shorthand for the common pattern of setting instance
    properties. By prefixing argument’s with @, CoffeeScript will automatically set the arguments as instance properties in the constructor.

    Basically, calling the argument @name means “use this argument to set the name property of the new Animal instance”.

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

Sidebar

Related Questions

<servlet> <servlet-name>myservlet</servlet-name> <servlet-class>workflow.WDispatcher</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>myservlet</servlet-name> <url-pattern>*NEXTEVENT*</url-pattern> </servlet-mapping> Above is the snippet from
I have this snippet from apple sample code LazyTableImages . In the code below
This snippet from official website works as expected: $treeObject = Doctrine::getTable('Category')->getTree(); $rootColumnName = $treeObject->getAttribute('rootColumnName');
This is a code snippet from O'Reilly Learning Opencv, cvNamedWindow(Example3, CV_WINDOW_AUTOSIZE); g_capture = cvCreateFileCapture(argv[1]);
Here's a snippet from my application: class PortolioItem(models.Model): ... user = models.ForeignKey(User) contract =
This code snippet is from C# in Depth static bool AreReferencesEqual<T>(T first, T second)
Below is a snippet from the Adobe Live Docs SampleDataEvent class. It demonstrates how
Consider this code sample: public class Human { public string Value { get; set;}
So, given that I have an instance of this component: foo.cfc <cfcomponent> <cffunction name=locateMe>
A snippet from the Android Activities document(scroll down to the foreground lifetime line) says

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.