1. Home
  2. Javascript
  3. String ends with

Check if the string ends with the given text.

#javascript#string#es6
let title = 'Section introduction';
title.endsWith('duction') // Returns true
copy
Full Javascript cheatsheet