I am coming from a python background and do not understand this, is there a way in javascript to get the last 2nd element of a string?
eg const name = "John"
the closest i could find is name.slice(-2) but it return two characters, in other words, including the last character as well, which is not want i want.