Theme
Primary Color
Lesson 10

New Strings Methods - startsWith, endsWith

محتوى الدرس

main.js
/*
  New String Methods
  startsWith => string.startsWith(Search String, Position = 0)
  endsWith => string.endsWith(Search String, End Position = string.length)
*/

let x = 'Video - Learn How To Learn';
console.log(x.endsWith('o', 20));
console.log('Video - Learn How To Learn'.length);