COFFEESCRIPT Questions and Answers

In CoffeeScript how clone-function is useful ?

Clone function is useful in creating a complete new object in Coffee Script by

  • Copying all attributes from the source object to the new object
  • Repeating the steps of copying attributes from the source object for all sub-objects by calling the clone-function
  • Creating a new object as the source object