From a8e0e49195c025df18e718f0e4960ee3bfa0c8b0 Mon Sep 17 00:00:00 2001 From: Roaaabushaqrah Date: Wed, 10 Feb 2021 17:55:03 +0300 Subject: [PATCH 1/4] ex1 --- index.js | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 index.js diff --git a/index.js b/index.js new file mode 100644 index 00000000..be23f841 --- /dev/null +++ b/index.js @@ -0,0 +1,86 @@ +// excersise 1: + +// ************ +var a ; +// ************ +let testContext = 15; +console.log(testContext); +// ************* +var a,b,c; +// ************ +var a ='1',b='2',c='3'; +// *********** +var success = true; +var x = false; +var x = new Boolean(false); +if (x) { + // this code is executed +} +// ************** +var arr = new Array(); +// console.log(arr) +// ************** +var arr = new Array(1,2,3,4,5,6,7,8,9,10); +console.log(arr) +// ************** +var arr2 = new Array('a','j'); +console.log(arr2) +// *************** +const object1 = { + a: 'somestring', + b: 42, + c: false + }; + + console.log(Object.keys(object1)); + +// *************** +const object2 = { + a: 'somestring', + b: 42, + c: false, + array: [1,2,3] + }; + + console.log((object2)); + // *************** +const object3 = { + a: 'somestring', + b: 42, + c: false, + array: [1,2,3], + obj :{ + name:'aseel', + job:"fullstack" + } + }; + + console.log((object2)); +// ***************** + let journal = [ + {events: ["work", "touched tree", "pizza", + "running", "television"], + squirrel: false}, + {events: ["work", "ice cream", "cauliflower", + "lasagna", "touched tree", "brushed teeth"], + squirrel: false}, + {events: ["weekend", "cycling", "break", "peanuts", + "beer"], + squirrel: true}, + + ]; +// ***************** +var a=10,b=20; +function sum(a,b){ + return a+b; +} + +console.log(sum(a,b)); +// ************** +var a=10,b=20; +function multiply(a,b){ + return a*b; +} + +console.log(multiply(a,b)); +// \ No newline at end of file From c49d1a6444c190ab954596463a79a640ed30acd4 Mon Sep 17 00:00:00 2001 From: Roaaabushaqrah Date: Wed, 10 Feb 2021 18:16:48 +0300 Subject: [PATCH 2/4] EX one --- index.js | 105 ++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 81 insertions(+), 24 deletions(-) diff --git a/index.js b/index.js index be23f841..86a3f527 100644 --- a/index.js +++ b/index.js @@ -1,49 +1,54 @@ // excersise 1: - -// ************ +// ************************************ var a ; -// ************ +// ************************************ let testContext = 15; console.log(testContext); -// ************* +// ************************************* var a,b,c; -// ************ +// ************************************ var a ='1',b='2',c='3'; -// *********** +// ******************************* var success = true; var x = false; var x = new Boolean(false); if (x) { // this code is executed } -// ************** +// ************************************* +const r="aseel"; +// **************************************** var arr = new Array(); // console.log(arr) -// ************** +// ****************************************** var arr = new Array(1,2,3,4,5,6,7,8,9,10); console.log(arr) -// ************** -var arr2 = new Array('a','j'); +// ****************************************** +var arr2 = new Array('a','b','c','d','e', 'f', 'j'); console.log(arr2) -// *************** +// ******************************************* const object1 = { a: 'somestring', b: 42, c: false }; - console.log(Object.keys(object1)); - -// *************** +// ******************************************* +const object1 = { + a: 'coding', + b: 44444, + c: false + }; + console.log(Object.keys(object1)); +// ***************************************************** const object2 = { a: 'somestring', b: 42, c: false, array: [1,2,3] }; - console.log((object2)); - // *************** + // ******************************************* const object3 = { a: 'somestring', b: 42, @@ -54,9 +59,24 @@ const object3 = { job:"fullstack" } }; - console.log((object2)); -// ***************** +// ********************************************************* + const object3 = { + a: 'somestring', + b: 42, + c: false, + array: [1,2,3], + obj :{ + name:'aseel', + job:"fullstack" + }, + object :{ + name:'aseel', + job:"fullstack" + } + }; + console.log((object2)); +// *************************************************** let journal = [ {events: ["work", "touched tree", "pizza", "running", "television"], @@ -67,20 +87,57 @@ const object3 = { {events: ["weekend", "cycling", "break", "peanuts", "beer"], squirrel: true}, - ]; -// ***************** +// *************************************************** +let journal = [ + {events: ["work", "touched tree", "pizza", + "running", "television"], + squirrel: false}, + aseel= array(1,2,3) + {events: ["work", "ice cream", "cauliflower", + "lasagna", "touched tree", "brushed teeth"], + squirrel: false, + aseel= array(1,2,3) + }, + {events: ["weekend", "cycling", "break", "peanuts", + "beer"], + squirrel: true, + aseel= array(1,2,3) + }, + ]; var a=10,b=20; function sum(a,b){ return a+b; } - console.log(sum(a,b)); -// ************** +// ****************************************** var a=10,b=20; function multiply(a,b){ return a*b; } - console.log(multiply(a,b)); -// \ No newline at end of file +//******************************************** +const num1 = parseInt(prompt('Enter the first number ')); +const num2 = parseInt(prompt('Enter the second number ')); +//add two numbers +const sums = num1 + num2; +// display the sum +console.log(`The sum of ${num1} and ${num2} is ${sum}`); +//********************************************** +const num1 = parseInt(prompt('Enter the first number ')); +const num2 = parseInt(prompt('Enter the second number ')); +//add two numbers +const sums = num1 * num2; +// display the sum +console.log(`The sum of ${num1} and ${num2} is ${sum}`); +// *********************************************************************** +function returnvalue () { + return "hamzeh" +} +console.log(returnvalue()); +// *************************************************** +//Write a function to print a value +function printvalue() { + console.log("ali") +} +printvalue(); \ No newline at end of file From 67b23ab64b73dba58452cd8916a82c95b0a625ea Mon Sep 17 00:00:00 2001 From: Roaaabushaqrah Date: Tue, 16 Feb 2021 11:00:12 +0300 Subject: [PATCH 3/4] register --- firstnodejs | 1 + 1 file changed, 1 insertion(+) create mode 160000 firstnodejs diff --git a/firstnodejs b/firstnodejs new file mode 160000 index 00000000..363667dc --- /dev/null +++ b/firstnodejs @@ -0,0 +1 @@ +Subproject commit 363667dc30a12211c869e00e6b18673820f5228e From e89c014543ff31537f1192023157b4d95a4518f9 Mon Sep 17 00:00:00 2001 From: Roaaabushaqrah Date: Tue, 16 Feb 2021 11:03:25 +0300 Subject: [PATCH 4/4] register --- firstnodejs => register | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename firstnodejs => register (100%) diff --git a/firstnodejs b/register similarity index 100% rename from firstnodejs rename to register