Javascript substring before character. It can’t provide methods for every use case. It takes one optional argum...