Checks if value starts with searchString.
searchString
startsWith if value does not start with searchString.
startsWith
const startsWithId = startsWith("ID: ");startsWithId("123"); // Error: startsWithstartsWithId("ID: 123"); // passes Copy
const startsWithId = startsWith("ID: ");startsWithId("123"); // Error: startsWithstartsWithId("ID: 123"); // passes
The characters to be searched for at the start of value.
Checks if value starts with
searchString
.Throws
startsWith
if value does not start withsearchString
.Example