error in javascript example on readme