js textbook sample