mirror of
https://github.com/espruino/Espruino.git
synced 2025-12-08 19:06:15 +00:00
13 lines
291 B
JavaScript
13 lines
291 B
JavaScript
// https://github.com/espruino/Espruino/issues/233
|
|
|
|
String.intervals = [];
|
|
|
|
String.prototype.foo = function(period) {
|
|
console.log(this);
|
|
String.intervals[this]; // Used to reset 'this' by turning it into a 'name'
|
|
console.log(this);
|
|
result = this == "Hello";
|
|
};
|
|
|
|
"Hello".foo(100);
|