Standard LibraryTypesstringMethodsbackOn this pageback Method of string. back() -> string Returns the last element in the container. Throws an exception if the container is empty.