substring () In JavaScript, the substring () function is similar to the slice () function in that it is used to extract a section of a string and return it as a new string. The substring () function ...