put(name, data, domain, expires )

stores a variable in the cookie

Parameters

  • name - the key of the variable
    • string
  • data - the data to store
    • string, object
  • domain - the domain name for which cookie will be saved (optional)
    • string
  • expires - the time which specifies cookie life-time (optional)
    • date

Returns

method doesn't return any data