FYI string.slice() takes the same arguments as string.substring() as long as the arguments are not negative and saves 4 bytes.