2 changed files with 158 additions and 37 deletions
  1. 3 10
      js/05/index.html
  2. 155 27
      js/05/js/script.js

+ 3 - 10
js/05/index.html

@@ -7,16 +7,9 @@
     <title>Document</title>
 </head>
 <body>
-    <table>
-        <tr>
-            <td>12</td>
-            <td>12</td>
-        </tr>
-        <tr>
-            <td>12</td>
-            <td>12</td>
-        </tr>
-    </table>
+    
+        <h1 class="wtf"></h1>
+    
     <script src="./js/script.js"></script>
 </body>
 </html>

+ 155 - 27
js/05/js/script.js

@@ -60,22 +60,22 @@
 
 //========================================================================================//
 
-let a = {
-    name: 'Vasya',
-    surname: 'Dibil',
-    fathername: 'Petrovich'
-}
-let b = {
-    name: 'Petya',
-    surname: 'Daun',
-    fathername: 'Abramovich'
-}
-let c = {
-    name: 'Kolya',
-    surname: 'Idiot',
-    fathername: 'Ivanovich'
-}
-let person = [a, b, c];
+// let a = {
+//     name: 'Vasya',
+//     surname: 'Dibil',
+//     fathername: 'Petrovich'
+// }
+// let b = {
+//     name: 'Petya',
+//     surname: 'Daun',
+//     fathername: 'Abramovich'
+// }
+// let c = {
+//     name: 'Kolya',
+//     surname: 'Idiot',
+//     fathername: 'Ivanovich'
+// }
+// let person = [a, b, c];
 
 
 // let str = "<table border='1'>"
@@ -84,16 +84,144 @@ let person = [a, b, c];
 // }
 // str += "</table>"
 
+//========================================================================================//
 
-
-let str = "<table border = '1'>"
-for (let i in person){
+// let str = "<table border = '1'>"
+// for (let i in person){
     
-    for (const k in person[i]) {
-    str += `<tr><td>${[k]}</td><td>${person[i][k]}</td></tr>`
-    }
-}
-str += "</table>"
-
-console.log(str)
-document.write(str)
+//     for (const k in person[i]) {
+//     str += `<tr><td>${[k]}</td><td>${person[i][k]}</td></tr>`
+//     }
+// }
+// str += "</table>"
+
+// console.log(str)
+// document.write(str)
+
+//========================================================================================//
+
+
+// let a = {
+//     name: 'Vasya',
+//     surname: 'Dibil',
+//     fathername: 'Petrovich'
+// }
+// let b = {
+//     name: 'Petya',
+//     surname: 'Daun',
+//     fathername: 'Abramovich'
+// }
+// let c = {
+//     name: 'Kolya',
+//     surname: 'Idiot',
+//     fathername: 'Ivanovich'
+// }
+// let d = {
+//     "name": "Morten", "surname": "Rakal", "fathername": "Yanich"
+// }
+
+
+// let person = [a, b, c, d];
+
+// let out = document.querySelector('.wtf')
+// out.innerHTML += JSON.stringify(person)
+
+
+//========================================================================================//
+
+// let somePage = {
+//         tagName: "body",
+//         subTags: 
+//     [
+//         {
+//             tagName: "div",
+//             subTags: 
+//             [
+//                 {
+//                     tagName: "span",
+//                     text: "Enter a data please:"
+//                 },
+//                 {
+//                     tagName: "input",
+//                     attrs: 
+//                     {
+//                         type: "text",
+//                         id: "name"
+//                     }
+//                 },
+//                 {
+//                     tagName: "input",
+//                     attrs: 
+//                     {
+//                         type: "text",
+//                         id: "surname"
+//                     }
+//                 }
+//             ],
+//         },
+//         {
+//             tagName: "div",
+//             subTags: 
+//             [
+//                 {
+//                     tagName: "button",
+//                     text: "OK",
+//                     attrs: 
+//                     {
+//                         id: "ok"
+//                     }
+//                 },
+//                 {
+//                     tagName: "button",
+//                     text: "Cancel",
+//                     attrs: 
+//                     {
+//                         id: "Cancel"
+//                     }
+//                 }
+//             ]
+//         }
+//     ]
+// }
+// let out = document.querySelector('.wtf')
+// out.innerHTML += JSON.stringify(somePage)
+
+
+
+
+//========================================================================================//
+
+
+
+// let arr = [1,2,3,4,5, "a", "b", "c"]
+// let [even1, even2] = [2, 4];
+// let [odd1, odd2, odd3] = [1, 3, 5];
+// let [letter1, letter2, letter3] = ['a', 'b', 'c']
+
+
+//========================================================================================//
+
+
+// let arr = [1, "abc"];
+
+// let [number] = [1];
+// let [s1, s2, s3] = arr[1, 1, 1];
+
+//========================================================================================//
+
+
+// let obj = {name: 'Ivan',
+//            surname: 'Petrov',
+//            children: [{name: 'Maria'}, {name: 'Nikolay'}]}
+
+// let {
+//     name,
+//     surname,
+//     children: [{name: name1}, {name: name2}]
+// } = obj;
+
+//========================================================================================//
+
+let arr = [1,2,3,4, 5,6,7,10];
+
+let [a,b,] = arr;