javascript code from popular books