Analysis of the discontinuous Galerkin method for Hamilton—Jacobi equations