Personal code snippet while reading <<Eloquent JavaScript>>