Get the last character in a provided string.
$ npm i last-char
// Dependencies
var LastChar = require("last-char");
console.log(LastChar("foo"));
// => "o"
console.log(LastChar("bar"));
// => "r"
None yet. If you wrote or found an article about this project, add it in this section. 📝
Returns the last character of the provided string.
- String
input
: The input string.
- String The last character of the provided string.
Have an idea? Found a bug? See how to contribute.
KINDLY © Ionică Bizău–The LICENSE file contains a copy of the license.