wiki/content/20201112095428-javascript_string_endswith_method.md

23 lines
469 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-29 18:27:12 +00:00
date: 2020-11-12
2024-05-06 20:40:05 +00:00
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)