JavaScript 2025 · Strings
Check the start, end or contents
Test a string without a regular expression.
url.startsWith("https://");
file.endsWith(".png");
text.includes("error");
Official JavaScript 2025 documentation
JavaScript 2025 · Strings
Test a string without a regular expression.
url.startsWith("https://");
file.endsWith(".png");
text.includes("error");
Official JavaScript 2025 documentation
Was this page helpful?