mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-24 20:46:22 +00:00
22 lines
469 B
Markdown
22 lines
469 B
Markdown
---
|
|
date: 2020-11-12
|
|
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)
|