<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<h1>Hello Plunker!</h1>
</body>
</html>
//by Yuriy Gorodilov
'use strict';
// Почему планкер решил, что __proto__ is deprecated?
Function.__proto__.defer = function(ms) {
let self = this;
return function() {
setTimeout( () => { self.apply(this, arguments) }, ms );
}
}
function f(a, b) {
alert( a + b );
}
f.defer(1000)(1, 2); // выведет 3 через 1 секунду.
/* Styles go here */