profileRyan KesPGP keyI build stuffEmailGithubTwitterLast.fmMastodonMatrix

JavaScript String endsWith Method

Introduction

Introduced in ES6

Syntax

console.log("hello".endsWith("ello")) // true
console.log("hello".endsWith("ello", 5)) // true

See also