In this challenge, your task is to write a program or function which takes in a String and outputs a truthy or falsey value based on whether the first character and the last character of the input String are equal.
You may take input in any way reasonable way. However, assuming that the input is present in a predefined variable is not allowed. Reading from a file, console, command line, input field etc., or taking input as a function argument is allowed.
You may output in any reasonable format, except for assigning the result to a variable. Writing to a file, console, command line, modal box, function
return statements etc. is allowed.
The input can be empty String as well, for which you should return a falsey value.
Single-Char Input Strings should have a truthy result.
Your program should be case-sensitive.
helloHshould output a falsey value.
You can only have a single Truthy value and a single Falsey value. For example, outputting
falsefor an Input String and
0for another input String as Falsey values is not allowed.
Standard loopholes are not allowed.
Input -> Output "10h01" Truthy "Nothing" Falsey "Acccca" Falsey "wow!" Falsey "wow" Truthy "H" Truthy "" Falsey
This is code-golf, so the shortest code in bytes wins!