Daria10 3 anos atrás
pai
commit
8794243853
3 arquivos alterados com 0 adições e 70 exclusões
  1. 0 12
      index.html
  2. 0 58
      main.js
  3. 0 0
      test.txt

+ 0 - 12
index.html

@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <title>Document</title>
-    <script src="main.js"></script>
-</head>
-<body>
-    
-</body>
-</html>

+ 0 - 58
main.js

@@ -1,58 +0,0 @@
-// /////////////////////////makeProfileTimer
-function makeProfileTimer() {
-    let startTime = performance.now();
-    return function () {
-        return performance.now() - startTime;
-    }
-};
-const timer = makeProfileTimer();
-
-alert('Замеряем время работы этого alert');
-alert(`Time for this alert running is: ${timer()}`);
-
-// ////////////////////// makeSaver
-function makeSaver(func) {
-    let run1 = true;
-    let saveResult;
-    return function () {
-        if (run1) {
-            saveResult = func();
-            run1 = false;
-            console.log(`Result is saved: ${saveResult}`);
-        }
-        return saveResult;
-    }
-}
-
-var saver = makeSaver(Math.random);
-
-var value1 = saver();
-var value2 = saver();
-value1 === value2;
-
-var saver2 = makeSaver(() => console.log('saved function called') || [null, undefined, false, '', 0, Math.random()][Math.ceil(Math.random() * 6)]);
-var value3 = saver2();
-var value4 = saver2();
-
-value3 === value4;
-
-// //////////////////////////Final Countdown
-function finalCountdown() {
-    for (let i = 0; i < 5; i++) {
-        setTimeout(() => console.log(5 - i), 1000 * i)
-    }
-    setTimeout(() => console.log("поехали !"), 5000)
-}
-
-// ////////////////////////////myBind
-function myBind(func, tempThis, tempArray) {
-    return function (...arguments) {
-        let i = 0;
-        let newTempArray = tempArray.map((value) => (value === undefined ? arguments[i++] : value));
-
-        return func.apply(tempThis, newTempArray); 
-    };
-}
-
-
-

+ 0 - 0
test.txt