Time to Recap 2

The Troy Dimes book was OK, however it came with another book, A Beginners Guide to the JavaScript Programming Language.  So whilst the other one was easy going, I expect this one to be too and will only take an hour and a half to go through.  So I did it and I’ve posted the important points I took away from the book below.

Variables are nothing but data containers.

document is an object with a number of properties and methods that access all the elements in the HTML document from JavaScript.

JavaScript does not support arrays with named indexes.

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 property to create cookies in JavaScript.

document.cookie = “cookie_name=cookie_value”;

document.cookie = “cookie_name=cookie_value; expires=expiry_date”;

The Document Object Model(DOM) is a programming interface or standard for accessing HTML, XML documents.  The browser creates a DOM of a web page when it is loaded, and JavaScript has the power to manipulate this model.

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.



Leave a Reply

Your email address will not be published. Required fields are marked *