updated the pure javascript example
updated the pure javascript example