If I want to a create prototype on String
, how can I do so with the ES6 fat arrow syntax and return the string. If I do :
String.prototype.foo = () => {
return this
}
..it returns the Window object, which makes sense since this
is binded with the fat arrow.
How exactly would I return this
?