wiki/content/20201112095525-javascript_string_startswith_method.md

19 lines
411 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-30 17:04:36 +00:00
date: 20201112
2024-05-06 20:40:05 +00:00
id: 8a5acfc2-e49c-4f3a-8823-00d7b57e8569
title: JavaScript String startsWith Method
---
# Syntax
``` javascript
console.log('hello'.startsWith('hell')) // true
console.log('hello'.startsWith('ell', 1)) // true
```
# See also
- [endsWith](20201112095428-javascript_string_endswith_method)
- [JavaScript String Prototype
Methods](20201112095341-javascript_string_prototype_methods)