From 6db74645605925909801a759871f87af39ab458a Mon Sep 17 00:00:00 2001 From: D1telo Date: Mon, 3 Oct 2022 18:53:15 +0300 Subject: [PATCH 1/2] A tiny js world D1telo v1.0 --- submissions/D1telo/a-tiny-js-world/index.js | 77 +++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 submissions/D1telo/a-tiny-js-world/index.js diff --git a/submissions/D1telo/a-tiny-js-world/index.js b/submissions/D1telo/a-tiny-js-world/index.js new file mode 100644 index 0000000000..ee7ee6bbbe --- /dev/null +++ b/submissions/D1telo/a-tiny-js-world/index.js @@ -0,0 +1,77 @@ +import { print } from "./js/lib.js"; +/* Refer to https://github.com/OleksiyRudenko/a-tiny-JS-world for the task details + Complete the below for code reviewers' convenience: + + Code repository: _put repo URL here_ + Web app: _put project's github pages URL here_ + */ + +// ======== OBJECTS DEFINITIONS ======== +// Define your objects here + +const dog = { + species: 'dog', + name: 'Toby', + gender: 'male', + legs: 4, + hands: null, + voice: 'woof-woof!' +}; + +const cat = { + species: 'cat', + name: 'Tom', + gender: 'female', + legs: 4, + hands: null, + voice: 'meow-meow!' +}; + +const man = { + species: 'human', + name: 'Denys', + gender: 'male', + legs: 2, + hands: 2, + voice: 'Glory Ukraine!' +}; + +const woman = { + species: 'human', + name: 'Anna', + gender: 'female', + legs: 2, + hands: 2, + voice: 'Support Ukraine!' +}; + +const catWoman = Object.create(cat); +catWoman.species = 'CatWoman'; +catWoman.name = 'Jesica'; +catWoman.gender = 'female'; +catWoman.legs = 2; +catWoman.hands = 2; + +const speciesAll = [dog, cat, man, woman, catWoman]; +const qualityPersonage = ['species', 'name', 'gender', 'legs', 'hands', 'voice']; + +speciesAll.map(personage => print(qualityPersonage.map(quality => personage[quality]).join(' - '))); + +// ======== OUTPUT ======== +/* Use print(message) for output. + Default tag for message is
. Use print(message,'div') to change containing element tag.
+
+   Message can contain HTML markup. You may also tweak index.html and/or styles.css.
+   However, please, REFRAIN from improving visuals at least until your code is reviewed
+   so code reviewers might focus on a single file that is index.js.
+   */
+
+/* Print examples:
+   print('ABC');
+   print('ABC');
+   print('ABC', 'div');
+
+   print('human; John; male; 2; 2; Hello world!; Rex, Tom, Jenny');
+   print('human; John; male; 2; 2; Hello world!; Rex, Tom, Jenny');
+   print('human; John; male; 2; 2; Hello world!; Rex, Tom, Jenny', 'div');
+   */

From afd427060f7f9312d48a111f904fc13563237dbb Mon Sep 17 00:00:00 2001
From: D1telo 
Date: Tue, 11 Oct 2022 12:56:51 +0300
Subject: [PATCH 2/2] Update all file self check

---
 submissions/D1telo/a-tiny-js-world/index.js | 22 ++-------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/submissions/D1telo/a-tiny-js-world/index.js b/submissions/D1telo/a-tiny-js-world/index.js
index ee7ee6bbbe..7036fcdebd 100644
--- a/submissions/D1telo/a-tiny-js-world/index.js
+++ b/submissions/D1telo/a-tiny-js-world/index.js
@@ -2,8 +2,8 @@ import { print } from "./js/lib.js";
 /* Refer to https://github.com/OleksiyRudenko/a-tiny-JS-world for the task details
    Complete the below for code reviewers' convenience:
 
-   Code repository: _put repo URL here_
-   Web app: _put project's github pages URL here_
+   Code repository: https://github.com/D1telo/a-tiny-JS-world/blob/master/index.js
+   Web app: https://d1telo.github.io/tiny-js/
    */
 
 // ======== OBJECTS DEFINITIONS ========
@@ -57,21 +57,3 @@ const qualityPersonage = ['species', 'name', 'gender', 'legs', 'hands', 'voice']
 
 speciesAll.map(personage => print(qualityPersonage.map(quality => personage[quality]).join(' - ')));
 
-// ======== OUTPUT ========
-/* Use print(message) for output.
-   Default tag for message is 
. Use print(message,'div') to change containing element tag.
-
-   Message can contain HTML markup. You may also tweak index.html and/or styles.css.
-   However, please, REFRAIN from improving visuals at least until your code is reviewed
-   so code reviewers might focus on a single file that is index.js.
-   */
-
-/* Print examples:
-   print('ABC');
-   print('ABC');
-   print('ABC', 'div');
-
-   print('human; John; male; 2; 2; Hello world!; Rex, Tom, Jenny');
-   print('human; John; male; 2; 2; Hello world!; Rex, Tom, Jenny');
-   print('human; John; male; 2; 2; Hello world!; Rex, Tom, Jenny', 'div');
-   */