Daria10 3 년 전
부모
커밋
8794243853
3개의 변경된 파일0개의 추가작업 그리고 70개의 파일을 삭제
  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