Variables are nothing but data containers.
An object is nothing but a collection of key/value pairs.
Cookie is a small piece of data sent from a website to the Web browser of the visitor.
document.cookie = “cookie_name=cookie_value”;
document.cookie = “cookie_name=cookie_value; expires=expiry_date”;
Most common method using the DOM is document.getElementById
Most times, variables or arrays do not simulate real-life situations. Object orientation can help by creating objects which simulate real-life objects.
Can access objects by using the property name: var variable_name = object_name.property_name;
An object constructor is used to create many objects of one type.
Overall I found this book to be better than Troy Dimes book, but not by much the chapters on cookies, DOM and OOP were a nice gentle introduction, I will of course be diving in deeper into the subject.