String.prototype.substringbeginnerconst str = 'Hello, World!'
str.substring(7, 12) // β 'World'
str.substring(5, 2) // β 'llo' (args swapped)
str.substring(7) // β 'World!'Use substring() to extract characters between two indices, automatically swapping them if start is greater than end.
When start === end, .substring() returns an empty string.
Challenge: Implement emptySubstring(str, n) that calls substring(n, n).
emptySubstring('hello', 2) // β ''