Skip to content

Commit

Permalink
fix: Clarify string-endswith examples (#1705)
Browse files Browse the repository at this point in the history
  • Loading branch information
tillydray committed May 14, 2022
1 parent 0f096b2 commit f670798
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions live-examples/js-examples/string/string-endswith.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
const str1 = 'Cats are the best!';

console.log(str1.endsWith('best!'));
// expected output: true

console.log(str1.endsWith('best', 17));
// expected output: true

const str2 = 'Is this a question';
const str2 = 'Is this a question?';

console.log(str2.endsWith('?'));
console.log(str2.endsWith('question'));
// expected output: false

0 comments on commit f670798

Please sign in to comment.