Problem

Return the last character of a non-empty String.

Examples

  • lastChar("code") -> "e"
  • lastChar("x") -> "x"
Compile and test (Ctrl+Enter)