From f0468f94e37411aa5da878dec4a5a127fb4b114c Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Tue, 23 Oct 2018 13:35:07 +0300 Subject: [PATCH 01/22] Remove .DS_store --- .DS_Store | Bin 6148 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 4fed28f7b6b7037ac8da47f498676395e4c4cb7c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK%Sr=55Ukb(1G(hralSzC50((WAU_~xMTEc}qMrBUcll{nKahlF@#ICSp{Hhg zx@MR7B};py4k8jvACV_7U{4) zQKJ-)0+$M0=W^rq|AD^H|6h`{k^)lTUnyYSZok{|NmW~CkMmmF=#O;I`J%gV9uy8y lj)_r@x$ts)8%dehe9ry8a7qk1<3T6tXTWulNrAss;2WRX8MOca From d0b7e5787afb7eec2362fce6469f0f21ee96d480 Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Tue, 23 Oct 2018 13:39:42 +0300 Subject: [PATCH 02/22] Final code for the branch --- favicon.png | Bin 0 -> 8617 bytes index.html | 22 ++++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 favicon.png create mode 100644 index.html diff --git a/favicon.png b/favicon.png new file mode 100644 index 0000000000000000000000000000000000000000..0a18ed3b1fd42743e8434aa0e45a9731122f15d9 GIT binary patch literal 8617 zcmc(FWmMGd*Y40DDIg)OARsU>w6uhPNQu%?0}M!acPb##Js6LuNOuoCNJ!_c7>6XO_@fkeG9u8>jkiKc!ung3QpwJb>sGK->OsE(pSauI4Iuy^jq z;j>2quaBTeD(X-wMO-RHHIO1Pi2^YP4lxHOh~s~z5m$%ie|EzE<0k(`!jyk}G0W$qROUL@TK{L!T;^uaC) zb>JH>ScY56q40?^J5FptN5!Jf_l`>fMmlg`In*HQdDOLQb4~lvjdY5aQF%!#Dkm=2 z{bi)!pgII*o2)#$*Z@QtQf`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Nc3_clp0(XI1)8>|d zK+iHqF>RJ%I{(e^fG16sIfn9|w`_LUNEL^^i!V;vs7|YEr{CiXqk(tR@pVqLX7X_l zi$?-V1c@gv79Zz93J~B$q84NTqPtnr-2}0)c3oNfw(&I#Lune|Z3r1^L#?%dUfruR z8wiQiP;m6{l|0{Acqn(_|68@=qL95GeV$9GnO(TU(dpKt_3hFB>qRtqv??);t~9Y5 zGez)=$Q#Pw-E4-z;19onYk4kD6+=&JOHUgqsJjjD00|30gasfF0f^WuVThEdq?D)x zpOBE0kWiNz7x;hc;N)U$Z|nDe?@)CwFB$0Y>~;nZ7h6vsOLrTPx|1c$M$-~z4|QM{ z2aAKB2uQI1JEf4M07Qaa7b4DX=jrJxB`E0Q;{&$8wFcgRHQ2=+mfKu^`%?mj+Yw*c zc{y20Nh!NPy_{^EJ*A{{083H|>zkfyzpji;Zh4d~x>3A#GNG03-VUm`(E)U literal 0 HcmV?d00001 diff --git a/index.html b/index.html new file mode 100644 index 0000000..6e14d5e --- /dev/null +++ b/index.html @@ -0,0 +1,22 @@ + + + + + + + + + JavaScript embedded into the HTML + + + + + + + \ No newline at end of file From f878fd716db2d3e1b67980decb62601770ea87a2 Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Tue, 23 Oct 2018 14:26:59 +0300 Subject: [PATCH 03/22] Final --- index.html | 8 +------- index.js | 1 + 2 files changed, 2 insertions(+), 7 deletions(-) create mode 100644 index.js diff --git a/index.html b/index.html index 6e14d5e..b77bd0c 100644 --- a/index.html +++ b/index.html @@ -10,13 +10,7 @@ - + \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..68548f9 --- /dev/null +++ b/index.js @@ -0,0 +1 @@ +console.log("Hello from external JavaScript file"); \ No newline at end of file From 4a3d4e4fe45a39800ae7c1b659ed76da7d4f9557 Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Thu, 25 Oct 2018 08:06:14 +0300 Subject: [PATCH 04/22] Final --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index b77bd0c..e0df346 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ - JavaScript embedded into the HTML + JavaScript Basics From 95bab3d868a5ea694f7978925a197ddbb594a764 Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Mon, 29 Oct 2018 12:19:33 +0200 Subject: [PATCH 05/22] Start --- index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/index.js b/index.js index 68548f9..e69de29 100644 --- a/index.js +++ b/index.js @@ -1 +0,0 @@ -console.log("Hello from external JavaScript file"); \ No newline at end of file From 34b8edd1497b14d8ce2d18c32fabbbd2a2c34536 Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Tue, 30 Oct 2018 09:49:19 +0200 Subject: [PATCH 06/22] Final --- index.js | 117 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/index.js b/index.js index e69de29..3645fb4 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,117 @@ +// /** +// * EXAMPLE 1 - Variable declaration +// */ +// var a; + +// console.log(a); + +// // console.log(b); // Uncaught ReferenceError: b is not defined + +// let c; + +// console.log(c); + +// // const d; // Uncaught SyntaxError: Missing initializer in const declaration + +// /** +// * EXAMPLE 2 - "let" +// */ +// let myNumber = 10; + +// console.log(myNumber); + +// // declaration +// let myString; + +// console.log(myString); + +// // assignment +// myString = "Hello from String"; + +// console.log(myString); + +// // re-assignment +// myString = "New value for myString variable"; + +// console.log(myString); + +// /** +// * EXAMPLE 3 - "var" +// */ +// var myNumber = 10; + +// console.log(myNumber); + +// // declaration +// var myString; + +// console.log(myString); + +// // assignment +// myString = "Hello from String"; + +// console.log(myString); + +// // re-assignment +// myString = "New value for myString variable"; + +// console.log(myString); + +// /** +// * EXAMPLE 4 - "const" +// */ +// const myBoolean = true; + +// console.log(myBoolean); + +// // myBoolean = false; // Assignment to constant variable. + +// // const myBoolean = false; // Uncaught SyntaxError: Identifier 'myBoolean' has already been declared + +// /** +// * CHALLENGE 1 +// * +// * Declare variable "myObject" and assign value {}. +// * Print this variable to the console. +// * NOTE: variable "myObject" will NOT be reassigned in the future +// */ +// const myObject = {}; + +// console.log(myObject); + +// // myObject = {}; // Uncaught TypeError: Assignment to constant variable. + +// /** +// * CHALLENGE 2 +// * Declare "x" and assign value 10 to it. +// * Declare "y" and assign value true to it +// * Declare "myObject" and assign object with two name-value pairs +// * Declare "anotherObject". +// * Later assign value to it - object with three name-value pairs +// */ +// let x = 10; +// const y = true; +// const myObject = { +// a: x, +// b: y +// }; +// console.log(myObject); +// /** +// * {a: 10, b: true, __proto__: Object} +// */ +// x = 20; +// let anotherObject; +// anotherObject = { +// newA: x, +// b: y, +// c: myObject +// }; +// console.log(anotherObject); +// /** +// * { +// * newA: 20, +// * b: true, +// * c: {a: 10, b: true, __proto__: Object}, +// * __proto__: Object +// * } +// */ \ No newline at end of file From 900c9808053255f73d45fbc730d4ee4dc0fdaded Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Tue, 30 Oct 2018 13:29:23 +0200 Subject: [PATCH 07/22] Start --- index.js | 117 ------------------------------------------------------- 1 file changed, 117 deletions(-) diff --git a/index.js b/index.js index 3645fb4..e69de29 100644 --- a/index.js +++ b/index.js @@ -1,117 +0,0 @@ -// /** -// * EXAMPLE 1 - Variable declaration -// */ -// var a; - -// console.log(a); - -// // console.log(b); // Uncaught ReferenceError: b is not defined - -// let c; - -// console.log(c); - -// // const d; // Uncaught SyntaxError: Missing initializer in const declaration - -// /** -// * EXAMPLE 2 - "let" -// */ -// let myNumber = 10; - -// console.log(myNumber); - -// // declaration -// let myString; - -// console.log(myString); - -// // assignment -// myString = "Hello from String"; - -// console.log(myString); - -// // re-assignment -// myString = "New value for myString variable"; - -// console.log(myString); - -// /** -// * EXAMPLE 3 - "var" -// */ -// var myNumber = 10; - -// console.log(myNumber); - -// // declaration -// var myString; - -// console.log(myString); - -// // assignment -// myString = "Hello from String"; - -// console.log(myString); - -// // re-assignment -// myString = "New value for myString variable"; - -// console.log(myString); - -// /** -// * EXAMPLE 4 - "const" -// */ -// const myBoolean = true; - -// console.log(myBoolean); - -// // myBoolean = false; // Assignment to constant variable. - -// // const myBoolean = false; // Uncaught SyntaxError: Identifier 'myBoolean' has already been declared - -// /** -// * CHALLENGE 1 -// * -// * Declare variable "myObject" and assign value {}. -// * Print this variable to the console. -// * NOTE: variable "myObject" will NOT be reassigned in the future -// */ -// const myObject = {}; - -// console.log(myObject); - -// // myObject = {}; // Uncaught TypeError: Assignment to constant variable. - -// /** -// * CHALLENGE 2 -// * Declare "x" and assign value 10 to it. -// * Declare "y" and assign value true to it -// * Declare "myObject" and assign object with two name-value pairs -// * Declare "anotherObject". -// * Later assign value to it - object with three name-value pairs -// */ -// let x = 10; -// const y = true; -// const myObject = { -// a: x, -// b: y -// }; -// console.log(myObject); -// /** -// * {a: 10, b: true, __proto__: Object} -// */ -// x = 20; -// let anotherObject; -// anotherObject = { -// newA: x, -// b: y, -// c: myObject -// }; -// console.log(anotherObject); -// /** -// * { -// * newA: 20, -// * b: true, -// * c: {a: 10, b: true, __proto__: Object}, -// * __proto__: Object -// * } -// */ \ No newline at end of file From 169c1c54f520c6a464ffa734a4cd5a326a7acf3e Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Tue, 30 Oct 2018 15:44:49 +0200 Subject: [PATCH 08/22] Final --- index.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/index.js b/index.js index e69de29..26fef89 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,29 @@ +let myVariable; + +console.log(myVariable); // undefined + +myVariable = 10; + +console.log(myVariable); // 10 + +myVariable = true; + +console.log(myVariable); // true + +myVariable = { + x: true, + y: 10 +}; + +console.log(myVariable); // {x: true, y: 10} + +myVariable.y = 20; + +console.log(myVariable); // {x: true, y: 20} + +// // THIS WILL BREAK THE CODE +// myVariable = null; + +myVariable.x = false; // Uncaught TypeError: Cannot set property 'x' of null + +console.log(myVariable); // {x: false, y: 20} \ No newline at end of file From 79e62765a306727aa9522a8a04cd7354f26bbab3 Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Thu, 1 Nov 2018 10:03:41 +0200 Subject: [PATCH 09/22] Start --- index.js | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/index.js b/index.js index 26fef89..e69de29 100644 --- a/index.js +++ b/index.js @@ -1,29 +0,0 @@ -let myVariable; - -console.log(myVariable); // undefined - -myVariable = 10; - -console.log(myVariable); // 10 - -myVariable = true; - -console.log(myVariable); // true - -myVariable = { - x: true, - y: 10 -}; - -console.log(myVariable); // {x: true, y: 10} - -myVariable.y = 20; - -console.log(myVariable); // {x: true, y: 20} - -// // THIS WILL BREAK THE CODE -// myVariable = null; - -myVariable.x = false; // Uncaught TypeError: Cannot set property 'x' of null - -console.log(myVariable); // {x: false, y: 20} \ No newline at end of file From 7532f397672303c7a64b7af47091bbdccb774a7b Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Thu, 1 Nov 2018 13:49:24 +0200 Subject: [PATCH 10/22] Final --- index.js | 158 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 158 insertions(+) diff --git a/index.js b/index.js index e69de29..2e73526 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,158 @@ +// /** +// * EXAMPLE 1 - Create object and modify its properties +// */ +// let myObject; + +// myObject = { +// a: 10, +// b: "abc" +// }; + +// console.log(myObject); + +// myObject.a = 15; + +// console.log(myObject); + +// myObject.c = true; + +// console.log(myObject); + +// delete myObject.b; + +// console.log(myObject); + +// console.log(myObject.a); + +// /** +// * CHALLENGE 1 +// * +// * Create variable called "myPost". +// * Initial value should be {} +// * Add property called "postTitle" and value "Object is reference type" +// * Add one more property "postLikes" with value 0 +// * Add third property "shared" and set its value to "false" +// * Increase value of the "postLikes" by 1 +// * Delete property "shared" +// */ +// let myPost = {}; + +// myPost.postTitle = "Object is reference type"; + +// myPost.postLikes = 0; + +// myPost.shared = false; + +// console.log(myPost); + +// myPost.postLikes = myPost.postLikes + 1; + +// console.log(myPost); + +// delete myPost.shared; + +// console.log(myPost); + +// /** +// * EXAMPLE 2 +// * +// * Use "const" for object declaration +// */ +// const myObject = {}; + +// myObject.a = true; // NO ERROR! Variable is not reassigned + +// console.log(myObject); + +// myObject = { +// a: true +// }; // Uncaught TypeError: Assignment to constant variable. + +// /** +// * CHALLENGE 2 +// * +// * Create variable "myObject" and add property "a" - 10. +// * Create another variable "copyOfMyObject" and its value should be myObject. +// * Add new property "b" with value false to the "copyOfMyObject". +// * Print to the console "myObject" and "copyOfMyObject" and interpret results. +// */ +// let myObject = { +// a: 10 +// }; +// let copyOfMyObject = myObject; + +// copyOfMyObject.b = false; + +// console.log(myObject); +// console.log(copyOfMyObject); + +// /** +// * EXAMPLE 3 +// * +// * Bracket notation +// */ +// let myObject = { +// a: true, +// b: null, +// c: 25 +// }; + +// console.log(myObject["a"]); // true + +// // console.log(myObject[a]); // Uncaught ReferenceError: a is not defined + +// console.log(myObject["b"]); // null + +// const propertyName = "c"; + +// console.log(myObject[propertyName]); // 25 + +// console.log(myObject["propertyName"]); // undefined + +// myObject["new" + "Property" + "Name"] = "Value for dynamically computed property name"; + +// console.log(myObject); + +// /** +// * EXAMPLE 4 +// * +// * Missing properties +// */ +// const myObject = { +// a: 3, +// b: true +// }; + +// // Code exectuion is not stopped +// console.log(myObject.c); // undefined + +// console.log(myObject.absentProperty); // undefined + +// // // Code exectuion is STOPPED +// // console.log(nonDeclaredVariable); // Uncaught ReferenceError: nonDeclaredVariable is not defined + +// // IMPORTANT!!! +// // NEVER ASSIGN "undefined" to any property or variable. Use "null" instead +// myObject.newPropertyWithUndefinedValue = undefined; + +// console.log(myObject); +// console.log(myObject.newPropertyWithUndefinedValue); + +// /** +// * CHALLENGE 3 +// * +// * Create object "objectWithNestedObject" with initial value {}. +// * Add property "nestedObject" with initial value {}. +// * Add property "a" with value "null" to "nestedObject". Use dot notation +// * Add property "b" with value "true" to "nestedObject". Use bracket notation. Create new variable with property name +// */ +// let objectWithNestedObject = {}; +// objectWithNestedObject.nestedObject = {}; + +// objectWithNestedObject.nestedObject.a = null; + +// const newPropertyName = "b"; + +// objectWithNestedObject.nestedObject[newPropertyName] = true; + +// console.log(objectWithNestedObject); \ No newline at end of file From a8c7bb4cf808d4fbced49ec117792830bee61262 Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Sun, 4 Nov 2018 22:29:58 +0200 Subject: [PATCH 11/22] Fix typo --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 2e73526..0d5c9bf 100644 --- a/index.js +++ b/index.js @@ -123,12 +123,12 @@ // b: true // }; -// // Code exectuion is not stopped +// // Code execution is not stopped // console.log(myObject.c); // undefined // console.log(myObject.absentProperty); // undefined -// // // Code exectuion is STOPPED +// // // Code execution is STOPPED // // console.log(nonDeclaredVariable); // Uncaught ReferenceError: nonDeclaredVariable is not defined // // IMPORTANT!!! From 26f38b1b753729ad23365cd9d9ce94cc8a314895 Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Mon, 5 Nov 2018 12:01:43 +0200 Subject: [PATCH 12/22] Start --- index.js | 158 ------------------------------------------------------- 1 file changed, 158 deletions(-) diff --git a/index.js b/index.js index 0d5c9bf..e69de29 100644 --- a/index.js +++ b/index.js @@ -1,158 +0,0 @@ -// /** -// * EXAMPLE 1 - Create object and modify its properties -// */ -// let myObject; - -// myObject = { -// a: 10, -// b: "abc" -// }; - -// console.log(myObject); - -// myObject.a = 15; - -// console.log(myObject); - -// myObject.c = true; - -// console.log(myObject); - -// delete myObject.b; - -// console.log(myObject); - -// console.log(myObject.a); - -// /** -// * CHALLENGE 1 -// * -// * Create variable called "myPost". -// * Initial value should be {} -// * Add property called "postTitle" and value "Object is reference type" -// * Add one more property "postLikes" with value 0 -// * Add third property "shared" and set its value to "false" -// * Increase value of the "postLikes" by 1 -// * Delete property "shared" -// */ -// let myPost = {}; - -// myPost.postTitle = "Object is reference type"; - -// myPost.postLikes = 0; - -// myPost.shared = false; - -// console.log(myPost); - -// myPost.postLikes = myPost.postLikes + 1; - -// console.log(myPost); - -// delete myPost.shared; - -// console.log(myPost); - -// /** -// * EXAMPLE 2 -// * -// * Use "const" for object declaration -// */ -// const myObject = {}; - -// myObject.a = true; // NO ERROR! Variable is not reassigned - -// console.log(myObject); - -// myObject = { -// a: true -// }; // Uncaught TypeError: Assignment to constant variable. - -// /** -// * CHALLENGE 2 -// * -// * Create variable "myObject" and add property "a" - 10. -// * Create another variable "copyOfMyObject" and its value should be myObject. -// * Add new property "b" with value false to the "copyOfMyObject". -// * Print to the console "myObject" and "copyOfMyObject" and interpret results. -// */ -// let myObject = { -// a: 10 -// }; -// let copyOfMyObject = myObject; - -// copyOfMyObject.b = false; - -// console.log(myObject); -// console.log(copyOfMyObject); - -// /** -// * EXAMPLE 3 -// * -// * Bracket notation -// */ -// let myObject = { -// a: true, -// b: null, -// c: 25 -// }; - -// console.log(myObject["a"]); // true - -// // console.log(myObject[a]); // Uncaught ReferenceError: a is not defined - -// console.log(myObject["b"]); // null - -// const propertyName = "c"; - -// console.log(myObject[propertyName]); // 25 - -// console.log(myObject["propertyName"]); // undefined - -// myObject["new" + "Property" + "Name"] = "Value for dynamically computed property name"; - -// console.log(myObject); - -// /** -// * EXAMPLE 4 -// * -// * Missing properties -// */ -// const myObject = { -// a: 3, -// b: true -// }; - -// // Code execution is not stopped -// console.log(myObject.c); // undefined - -// console.log(myObject.absentProperty); // undefined - -// // // Code execution is STOPPED -// // console.log(nonDeclaredVariable); // Uncaught ReferenceError: nonDeclaredVariable is not defined - -// // IMPORTANT!!! -// // NEVER ASSIGN "undefined" to any property or variable. Use "null" instead -// myObject.newPropertyWithUndefinedValue = undefined; - -// console.log(myObject); -// console.log(myObject.newPropertyWithUndefinedValue); - -// /** -// * CHALLENGE 3 -// * -// * Create object "objectWithNestedObject" with initial value {}. -// * Add property "nestedObject" with initial value {}. -// * Add property "a" with value "null" to "nestedObject". Use dot notation -// * Add property "b" with value "true" to "nestedObject". Use bracket notation. Create new variable with property name -// */ -// let objectWithNestedObject = {}; -// objectWithNestedObject.nestedObject = {}; - -// objectWithNestedObject.nestedObject.a = null; - -// const newPropertyName = "b"; - -// objectWithNestedObject.nestedObject[newPropertyName] = true; - -// console.log(objectWithNestedObject); \ No newline at end of file From a5e24b88647703904047dd98da6f4ff79fa95553 Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Sat, 10 Nov 2018 18:10:01 +0200 Subject: [PATCH 13/22] Examples added --- index.js | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) diff --git a/index.js b/index.js index e69de29..231366b 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,105 @@ +// /** +// * EXAMPLE 1 +// * +// * Simplest function in JavaScript +// */ +// function myFunction() {} + +// console.log(myFunction); // myFunction() {} + +// myFunction(); + +// const functionResult = myFunction(); + +// console.log(functionResult); // undefined + +// console.log(myFunction()); // undefined + +// console.log(myFunction(10, true)); // undefined + +// /** +// * EXAMPLE 2 +// * +// * Parameters of the function +// */ +// function myFunction(a, b) { +// console.log(a); +// console.log(b); +// } + +// myFunction(10, 5); // 10, 5 + +// myFunction(true, null); // true, null + +// myFunction(); // undefined, undefined + +// myFunction("abc"); // abc, undefined + +// console.log(myFunction(4, 3)); // undefined + +// /** +// * EXAMPLE 3 +// * +// * Function scope +// */ +// function myFunction(a, b) { +// console.log(a, b); +// } + +// console.log(myFunction(3, 2)); + +// console.log(a); // Uncaught ReferenceError: a is not defined +// console.log(b); + +// /** +// * EXAMPLE 4 +// * +// * Reuse parameter names +// */ +// function myFunction1(a, b) { +// console.log(a, b); +// } + +// function myFunction2(a, b) { +// console.log(a, b); +// } + +// const a = true; +// const b = null; + +// myFunction1(2, 3); // 2, 3 + +// myFunction2(5, 7); // 5, 7 + +// console.log(a, b); // true, null + +// /** +// * EXAMPLE 5 +// * +// * Add "return" +// */ +// function sum(a, b) { +// return a + b; +// } + +// sum(10, 5); // function returns 15, but we see nothing in the console + +// console.log(sum(2, 5)); // 7 +// console.log(sum(10, 3)); // 13 +// console.log(sum("abc", 2)); // "abc2" +// console.log(sum()); // NaN + +// /** +// * EXAMPLE 6 +// * +// * What happens after "return"? +// */ +// function myFunction(a) { +// console.log(a); +// return a; // function stops here +// console.log(a); +// const c = 20; +// console.log(c); +// } + +// myFunction(10); \ No newline at end of file From 484967fef583f0e7f70777a082879095f6173734 Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Sun, 11 Nov 2018 10:28:27 +0200 Subject: [PATCH 14/22] Final --- index.js | 74 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 231366b..850c707 100644 --- a/index.js +++ b/index.js @@ -102,4 +102,76 @@ // console.log(c); // } -// myFunction(10); \ No newline at end of file +// myFunction(10); + + +// /** +// * CHALLENGE 1 +// * +// * Create function called "mult" and it will have 3 parameters. +// * Create new variable and assign to it result of multiplication of all 3 parameters. +// * Print to the console result. +// * Don't use "return". +// */ +// function mult(a, b, c) { +// const result = a * b * c; +// console.log(result); +// } + +// mult(0, 3, 5); // 0 + +// mult(2, 3, 5); // 30 + +// mult(2, 3, "abc"); // NaN + +// mult(); // NaN + +// console.log(mult(2, 3, 5)); // 30 is printed inside of the function and function returns "undefined" + +// /** +// * CHALLENGE 2 +// * +// * Create a function "concatenateStrings" and it will have 2 parameters. +// * And this function will return concatenated string. +// */ +// function concatenateStrings(str1, str2) { +// return str1 + " " + str2; +// } + +// const str3 = concatenateStrings("Hello", "World"); // "Hello World" + +// console.log(str3); + +// /** +// * CHALLENGE 3 +// * +// * Create function "outerFunction" with 2 parameters. +// * Create function inside of the "outerFunction" and name it "innerFunction" with one parameter. +// * This "innerFunction" will return square of parameter (parameter * parameter). +// * +// * In the "outerFunction" sum both parameters. +// * Call "innerFunction" with argument that is equal to sum of both parameters of the "outerFunction". +// * Log to the console result of the "innerFunction" call. +// */ +// function outerFunction(a, b) { +// function innerFunction(c) { +// return c * c; +// } +// const sum = a + b; +// const result = innerFunction(sum); + +// console.log(result); +// } + +// // // Simplified +// // function outerFunction(a, b) { +// // function innerFunction(c) { +// // return c * c; +// // } + +// // console.log(innerFunction(a + b)); +// // } + +// outerFunction(2, 3); // 25 + +// outerFunction(3, 7); // 100 \ No newline at end of file From bc0e29ccfd58c58ee19718e86cc9e212e5758a7d Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Sun, 11 Nov 2018 10:35:28 +0200 Subject: [PATCH 15/22] Initial --- index.js | 177 ------------------------------------------------------- 1 file changed, 177 deletions(-) diff --git a/index.js b/index.js index 850c707..e69de29 100644 --- a/index.js +++ b/index.js @@ -1,177 +0,0 @@ -// /** -// * EXAMPLE 1 -// * -// * Simplest function in JavaScript -// */ -// function myFunction() {} - -// console.log(myFunction); // myFunction() {} - -// myFunction(); - -// const functionResult = myFunction(); - -// console.log(functionResult); // undefined - -// console.log(myFunction()); // undefined - -// console.log(myFunction(10, true)); // undefined - -// /** -// * EXAMPLE 2 -// * -// * Parameters of the function -// */ -// function myFunction(a, b) { -// console.log(a); -// console.log(b); -// } - -// myFunction(10, 5); // 10, 5 - -// myFunction(true, null); // true, null - -// myFunction(); // undefined, undefined - -// myFunction("abc"); // abc, undefined - -// console.log(myFunction(4, 3)); // undefined - -// /** -// * EXAMPLE 3 -// * -// * Function scope -// */ -// function myFunction(a, b) { -// console.log(a, b); -// } - -// console.log(myFunction(3, 2)); - -// console.log(a); // Uncaught ReferenceError: a is not defined -// console.log(b); - -// /** -// * EXAMPLE 4 -// * -// * Reuse parameter names -// */ -// function myFunction1(a, b) { -// console.log(a, b); -// } - -// function myFunction2(a, b) { -// console.log(a, b); -// } - -// const a = true; -// const b = null; - -// myFunction1(2, 3); // 2, 3 - -// myFunction2(5, 7); // 5, 7 - -// console.log(a, b); // true, null - -// /** -// * EXAMPLE 5 -// * -// * Add "return" -// */ -// function sum(a, b) { -// return a + b; -// } - -// sum(10, 5); // function returns 15, but we see nothing in the console - -// console.log(sum(2, 5)); // 7 -// console.log(sum(10, 3)); // 13 -// console.log(sum("abc", 2)); // "abc2" -// console.log(sum()); // NaN - -// /** -// * EXAMPLE 6 -// * -// * What happens after "return"? -// */ -// function myFunction(a) { -// console.log(a); -// return a; // function stops here -// console.log(a); -// const c = 20; -// console.log(c); -// } - -// myFunction(10); - - -// /** -// * CHALLENGE 1 -// * -// * Create function called "mult" and it will have 3 parameters. -// * Create new variable and assign to it result of multiplication of all 3 parameters. -// * Print to the console result. -// * Don't use "return". -// */ -// function mult(a, b, c) { -// const result = a * b * c; -// console.log(result); -// } - -// mult(0, 3, 5); // 0 - -// mult(2, 3, 5); // 30 - -// mult(2, 3, "abc"); // NaN - -// mult(); // NaN - -// console.log(mult(2, 3, 5)); // 30 is printed inside of the function and function returns "undefined" - -// /** -// * CHALLENGE 2 -// * -// * Create a function "concatenateStrings" and it will have 2 parameters. -// * And this function will return concatenated string. -// */ -// function concatenateStrings(str1, str2) { -// return str1 + " " + str2; -// } - -// const str3 = concatenateStrings("Hello", "World"); // "Hello World" - -// console.log(str3); - -// /** -// * CHALLENGE 3 -// * -// * Create function "outerFunction" with 2 parameters. -// * Create function inside of the "outerFunction" and name it "innerFunction" with one parameter. -// * This "innerFunction" will return square of parameter (parameter * parameter). -// * -// * In the "outerFunction" sum both parameters. -// * Call "innerFunction" with argument that is equal to sum of both parameters of the "outerFunction". -// * Log to the console result of the "innerFunction" call. -// */ -// function outerFunction(a, b) { -// function innerFunction(c) { -// return c * c; -// } -// const sum = a + b; -// const result = innerFunction(sum); - -// console.log(result); -// } - -// // // Simplified -// // function outerFunction(a, b) { -// // function innerFunction(c) { -// // return c * c; -// // } - -// // console.log(innerFunction(a + b)); -// // } - -// outerFunction(2, 3); // 25 - -// outerFunction(3, 7); // 100 \ No newline at end of file From e27423f51580e1380e9cad411bc437b4e99b01e5 Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Tue, 20 Nov 2018 11:57:06 +0200 Subject: [PATCH 16/22] Final --- index.js | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/index.js b/index.js index e69de29..83f7609 100644 --- a/index.js +++ b/index.js @@ -0,0 +1,38 @@ +// /** +// * EXAMPLE 1 +// * +// * Try to "declare" function expression +// */ +// // It is not possible to use function expression standalone +// function() { } //Uncaught SyntaxError: Unexpected token ( + +// /** +// * EXAMPLE 2 +// * +// * Assign function expression to the variable +// */ +// const myFunction = function() { }; + +// console.log(myFunction()); // undefined + +// console.log(myFunction); // ƒ () { } + +// /** +// * EXAMPLE 3 +// * +// * Callback function +// */ +// setTimeout(function() { +// console.log("Delayed message"); +// }, 3000); + +// /** +// * EXAMPLE 4 +// * +// * Callback function (example 2) +// */ +// let i = 1; +// setInterval(function() { +// console.log("Message logged each 1 second " + i); +// i = i + 1; +// }, 1000); \ No newline at end of file From 21379dd1835b59f193f63f1b7ae6158cf469d91d Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Tue, 20 Nov 2018 12:21:26 +0200 Subject: [PATCH 17/22] Final --- index.js | 53 +++++++++++++++-------------------------------------- 1 file changed, 15 insertions(+), 38 deletions(-) diff --git a/index.js b/index.js index 83f7609..783d5c1 100644 --- a/index.js +++ b/index.js @@ -1,38 +1,15 @@ -// /** -// * EXAMPLE 1 -// * -// * Try to "declare" function expression -// */ -// // It is not possible to use function expression standalone -// function() { } //Uncaught SyntaxError: Unexpected token ( - -// /** -// * EXAMPLE 2 -// * -// * Assign function expression to the variable -// */ -// const myFunction = function() { }; - -// console.log(myFunction()); // undefined - -// console.log(myFunction); // ƒ () { } - -// /** -// * EXAMPLE 3 -// * -// * Callback function -// */ -// setTimeout(function() { -// console.log("Delayed message"); -// }, 3000); - -// /** -// * EXAMPLE 4 -// * -// * Callback function (example 2) -// */ -// let i = 1; -// setInterval(function() { -// console.log("Message logged each 1 second " + i); -// i = i + 1; -// }, 1000); \ No newline at end of file +/** + * CHALLENGE 01: TASK - Function Expressions + * + * Use following built-in functions: + * setTimeout + * setInterval + * clearInterval + * + * You should print to the console ONLY 5 messages with interval 2 seconds: + * "Here is message number 1" + * "Here is message number 2" + * "Here is message number 3" + * "Here is message number 4" + * "Here is message number 5" + */ \ No newline at end of file From 8a94a5fc51de2b6f2244baf37a1bca31a5fd3c7c Mon Sep 17 00:00:00 2001 From: Bogdan Stashchuk Date: Tue, 20 Nov 2018 12:27:24 +0200 Subject: [PATCH 18/22] Fix name --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 783d5c1..1977f35 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,5 @@ /** - * CHALLENGE 01: TASK - Function Expressions + * JS-BASICS/CORE/CHALLENGE 01: TASK - Function Expressions * * Use following built-in functions: * setTimeout From d03363817d669e65bf5d1e8fc3bdec9afecf4577 Mon Sep 17 00:00:00 2001 From: TranquiloR Date: Fri, 10 Feb 2023 15:40:26 +0100 Subject: [PATCH 19/22] my own commit --- index.html | 2 +- index.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index e0df346..a810a97 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ - JavaScript Basics + New title diff --git a/index.js b/index.js index 1977f35..6b62df1 100644 --- a/index.js +++ b/index.js @@ -12,4 +12,11 @@ * "Here is message number 3" * "Here is message number 4" * "Here is message number 5" - */ \ No newline at end of file + */ +let myObject; + +myObject = { + a: 10, + b; "abc" +} +console.log (myObject) \ No newline at end of file From d4ecf37d52b6c55fc62c3350adbe225e20fd6f96 Mon Sep 17 00:00:00 2001 From: TranquiloR Date: Sat, 11 Feb 2023 02:21:28 +0100 Subject: [PATCH 20/22] my change --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 6b62df1..9a8e530 100644 --- a/index.js +++ b/index.js @@ -17,6 +17,6 @@ let myObject; myObject = { a: 10, - b; "abc" + b: "abc" } console.log (myObject) \ No newline at end of file From 73946981aebac17e50eb24ccb0f0c7fd02f218c6 Mon Sep 17 00:00:00 2001 From: TranquiloR Date: Sat, 11 Feb 2023 12:50:57 +0100 Subject: [PATCH 21/22] add const --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 9a8e530..3477f37 100644 --- a/index.js +++ b/index.js @@ -19,4 +19,6 @@ myObject = { a: 10, b: "abc" } -console.log (myObject) \ No newline at end of file +console.log (myObject) + const = 'private' + \ No newline at end of file From fa14cfb50218701ea973e90bd15b76239272966d Mon Sep 17 00:00:00 2001 From: TranquiloR Date: Sat, 11 Feb 2023 12:51:40 +0100 Subject: [PATCH 22/22] my test work --- index.html | 5 +++-- index.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index a810a97..66679ed 100644 --- a/index.html +++ b/index.html @@ -4,9 +4,10 @@ - + - New title + My_test_work + diff --git a/index.js b/index.js index 3477f37..651a55f 100644 --- a/index.js +++ b/index.js @@ -21,4 +21,4 @@ myObject = { } console.log (myObject) const = 'private' - \ No newline at end of file + console.log(const) \ No newline at end of file