Sometimes you will want to delete a cookie so that subsequent attempts to read the cookie return nothing. To do this, you just need to set the expiration date to a time in the past.
By array literal
By creating instance of Array
By using an Array constructor
Let’s see a simple code to create array using object literal.