Theme
Primary Color
Lesson 11

New Strings Methods - includes, repeat

محتوى الدرس

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

let x = 'Elzero Web School';
console.log(x.includes('eb', 8));
console.log(x.repeat(4));