From 7210cd18acf5b92e5d3d8440de344d893ec0d41b Mon Sep 17 00:00:00 2001 From: Shani Raby Date: Wed, 13 Feb 2019 10:25:30 +0200 Subject: [PATCH 1/6] feat: change func a to receive args!! --- js/hello_world.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/hello_world.js b/js/hello_world.js index 17ef608..77daf52 100644 --- a/js/hello_world.js +++ b/js/hello_world.js @@ -1,10 +1,10 @@ function main() { console.log('Hello world!'); - console.log('a() ===', a()); + console.log('a() ===', a(8,9)); } -function a() { - return 1 + 1; +function a(x, y) { + return x + y; } if (require.main === module) { From 24bc0a042a3dd9298db81b65eae378cd48f2b528 Mon Sep 17 00:00:00 2001 From: Shani Raby Date: Wed, 13 Feb 2019 10:55:33 +0200 Subject: [PATCH 2/6] feat: change a to do multi --- js/hello_world.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/hello_world.js b/js/hello_world.js index 77daf52..8c656b1 100644 --- a/js/hello_world.js +++ b/js/hello_world.js @@ -1,10 +1,10 @@ function main() { console.log('Hello world!'); - console.log('a() ===', a(8,9)); + console.log('a() ===', a(3,4)); } function a(x, y) { - return x + y; + return x * y; } if (require.main === module) { From dc3e000d672a19094641c483785fd6e07b5d5223 Mon Sep 17 00:00:00 2001 From: Shani Raby Date: Wed, 13 Feb 2019 10:57:17 +0200 Subject: [PATCH 3/6] feat: rename a to b --- js/hello_world.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/hello_world.js b/js/hello_world.js index 8c656b1..0beb85d 100644 --- a/js/hello_world.js +++ b/js/hello_world.js @@ -1,9 +1,9 @@ function main() { console.log('Hello world!'); - console.log('a() ===', a(3,4)); + console.log('a() ===', b(5,6)); } -function a(x, y) { +function b(x, y) { return x * y; } From ad8c7d25b04411b4fb27e092f342d9a81f015304 Mon Sep 17 00:00:00 2001 From: Shani Raby Date: Wed, 13 Feb 2019 11:25:52 +0200 Subject: [PATCH 4/6] rename --- js/hello_world.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/hello_world.js b/js/hello_world.js index 0beb85d..7075136 100644 --- a/js/hello_world.js +++ b/js/hello_world.js @@ -1,9 +1,9 @@ function main() { console.log('Hello world!'); - console.log('a() ===', b(5,6)); + console.log('a() ===', bla(5,6)); } -function b(x, y) { +function bla(x, y) { return x * y; } From 8a45adc8172bb0a02449d82eb74a77370b27c508 Mon Sep 17 00:00:00 2001 From: Shani Raby Date: Wed, 13 Feb 2019 11:27:00 +0200 Subject: [PATCH 5/6] add --- js/add.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 js/add.js diff --git a/js/add.js b/js/add.js new file mode 100644 index 0000000..c28a419 --- /dev/null +++ b/js/add.js @@ -0,0 +1,9 @@ + + + function add(x, y) { + return x + y; + console.log('add'); + } + + + \ No newline at end of file From bdd078cf0ca5898304c2f588862477dc89b929fe Mon Sep 17 00:00:00 2001 From: Shani Raby Date: Wed, 13 Feb 2019 11:27:32 +0200 Subject: [PATCH 6/6] sub --- js/sub.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 js/sub.js diff --git a/js/sub.js b/js/sub.js new file mode 100644 index 0000000..bdee2c6 --- /dev/null +++ b/js/sub.js @@ -0,0 +1,8 @@ + + + function sub(x, y) { + return x - y; + } + + + \ No newline at end of file