The collapse() method of the Range interface collapses the Range to one of its boundary points.
collapse()
MDN Reference