CoffeeScript
iterate
fat arrow in coffeescript
String with format
print = """
1st line
2nd line
#{supports interpolation}
last line
"""Instance method, variables
class Songs
_titles: 0 # instance var, Although it's directly accessible, the leading _ defines it by convention as private property.
get_count: ->
@_titles # access instance var
call_another_method: ->
return @get_count() # call another instance methodHow to write function as a part of parameter
reverse for loop
Last updated