String
String object extended with:
- New static methods:
raw()
- New instance methods:
startsWith()
,endsWith()
,includes()
,repeat()
, ...
String.raw`Line 1\nLine 2\nLine 3` // 'Line 1\\nLine 2\\nLine 3'
'Hello world'.startsWith('Hello') // true
'Hello world'.endsWith('world') // true
'Hello world'.includes('orl') // true
'Hello world'.repeat(2) // 'Hello worldHello world'
⛏ ES6 Katas: String
Hacer las siguientes katas: