Is the Last Character an "N"?

Published by Matt in

Create a function that takes a string (a random name). If the last character of the name is an "n", return true, otherwise return false.

Examples

is_last_character_n("Aiden") ➞ true

is_last_character_n("Piet") ➞ false

is_last_character_n("Bert") ➞ false

is_last_character_n("Dean") ➞ true

Notes

The function must return a boolean value ( i.e. true or false).

Watch a quick demo on how Edabit works.