mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-23 03:56:23 +00:00
22 lines
452 B
Markdown
22 lines
452 B
Markdown
|
---
|
||
|
id: 00b0d7a6-4222-47e3-a0c9-58f071fa404e
|
||
|
title: JavaScript String endsWith Method
|
||
|
---
|
||
|
|
||
|
# Introduction
|
||
|
|
||
|
Introduced in [ES6](20201030093404-es6)
|
||
|
|
||
|
# Syntax
|
||
|
|
||
|
``` javascript
|
||
|
console.log('hello'.endsWith('ello')) // true
|
||
|
console.log('hello'.endsWith('ello', 5)) // true
|
||
|
```
|
||
|
|
||
|
# See also
|
||
|
|
||
|
- [startsWith](20201112095525-javascript_string_startswith_method)
|
||
|
- [JavaScript String Prototype
|
||
|
Methods](20201112095341-javascript_string_prototype_methods)
|