Coffee Script Data Types - CoffeeScript

What is Coffee Script Data Types?

Coffee Script data types

One of the maximum fundamental characteristics of a programming language is the set of statistics kinds it supports. These are the sort of values that may be represented and manipulated in a programming language.

As Coffee Script compiles line with the aid of line to JavaScript, the statistics types furnished by means of Coffee Script are equal as JavaScript. Besides for the reality that Coffee Script adds some additional essence.

Coffee Script presents the following statistics types to work with −

  • Strings − The String information type represents a set of characters in popular and we constitute a string price with in-among double prices (" ").
    • Instance: "Raj", "Rahman"

  • Number − the number records type represents the numerical values.
    • Instance: 12, 212, and so on.
  • Boolean − Boolean statistics kind represents one little bit of data. There are best two viable values: true and fake.
  • Arrays − the Array object lets you store a couple of values in a single variable. It shops a fixed-size sequential series of factors of the equal kind.
    • Instance: student = ["Rahman","Ramu","Ravi","Robert"]
  • Gadgets − the gadgets in Coffee Script are much like the ones in JavaScript those are series of the residences. Wherein a belonging consists of a key and a value separated by means of a semi colon (:). In brief, Coffee Script objects are a group of key-value pairs.
    • Instance: scholar = {name: "Mohammed", age: 24, telephone: 9848022338 }
  • Null − A variable this is described and does now not keep any fee is taken into consideration and null. This is just like the null cost in JavaScript.
  • Undefined − A variable which hasn’t had any value assigned to it is considered as undefined variable. If you use such variables on your code, then you'll get undefined errors.

We will cover the records sorts Arrays and objects in element in separate chapters.

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

CoffeeScript Topics