but I wanted to know if the book contains real life situations and code examples at least for most of the chapters ? or its more a theoretical discussions ?
A lot of the examples are taken from experiences in developing libraries such as jQuery, Prototype and the like. But if you are asking if it's a cookbook type of book, then no.