Newcastle had won their last three games in a row and could have gone sixth with another under Eddie Howe, but were stunned by a resilient West Ham side who were clinical when the chances came.