Are the First and Last Characters the Same?

Given a string, assign the variable isSame to true if the first and last characters of the string are the same, otherwise set it to false. Use string indexing and the length property.
JavaScript
Console