diff --git a/warmUp1.js b/warmUp1.js index 359b609..d73f4ac 100644 --- a/warmUp1.js +++ b/warmUp1.js @@ -1,6 +1,25 @@ // 1-using + operator combine your partner first and last name . +var firstName = "Mohamed Amine" ; +var lastName = "Oueslati" ; +var fullName = firstName + " " + lastName ; + console.log (fullName) ; + // 2-find if the number 13 is a multiple of 3 or not. +var x = 13 ; +if ( x % 3 === 0 ) { + console.log ("13 is a multiple of 3") ; +} + console.log ("13 is not a multiple of 3") ; + // 3-calculate the average age of the follwing ages [13,14,13,15,16,17,19,13,16,15] -// 4-calculate your age in seconds. +var array = [13,14,13,15,16,17,19,13,16,15] ; +var sum = 0 ; + for (var i=0 ; i < array.length ; i++) { + sum += array[i] ; + } + console.log(sum/array.length) ; -// your code is here +// 4-calculate your age in seconds. +var age = 28 ; +var ageInSeconds = age * 365 * 24 * 60 * 60 ; + console.log (ageInSeconds) ; diff --git a/warmUp10.js b/warmUp10.js new file mode 100644 index 0000000..cbd2457 --- /dev/null +++ b/warmUp10.js @@ -0,0 +1,55 @@ +// Style your code and explain it step by step before jumping to code :D +// Read carefully, focus and test your code :) ... /\ HaPPy HaCkInG /\ + +// **************** git status **************** +// **************** git add fileName.js **************** +// **************** git status **************** +// **************** git commit -m "your message" **************** +// **************** git status **************** +// **************** git push origin master **************** + +// 1- Using recursion Write a JavaScript program to find the greatest common divisor (gcd) of two positive numbers. + +// **************** git status **************** +// **************** git add fileName.js **************** +// **************** git status **************** +// **************** git commit -m "your message" **************** +// **************** git status **************** +// **************** git push origin master **************** + +<<<<<<< HEAD +// in mathematics one of the methods to calculate the gcd of two numbers is to keep dividing the smallest number by the rest of the last division until the rest reach 0 +// then the last rest not equal to 0 will be the gcd ... thats what i did in this function i kept calling it again by putting num2 as first parameter +// and the rest of the last division as second parameter ... until i reach my condition (rest equal to 0) then i returned the last rest not equal to 0 + +function gcd (num1,num2) { + if (num1 % num2 === 0) { + return num2 + } + return gcd(num2, num1 % num2); +} + + +======= +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c +// 2-Write a function called sum that accepts two numbers as parameters, and sum them together but without suming them togther directly +//you can only add one at each summetion, you'll need to use recursion in this. + +// **************** git status **************** +// **************** git add fileName.js **************** +// **************** git status **************** +// **************** git commit -m "your message" **************** +// **************** git status **************** +// **************** git push origin master **************** +<<<<<<< HEAD + +// i used recursion in this function to decrease one from number 2 every time i call the function and add one to the result until num2 become equal to 0 +// then the result will be equal to num2 (by adding 1 , num2 times) before i added num1 to it ... to get num1 + num2 + +function sum(num1, num2) { + if (num2 === 0) + return num1 ; + return 1 + sum (num1,num2-1); +} +======= +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c diff --git a/warmUp11.js b/warmUp11.js new file mode 100644 index 0000000..d17861e --- /dev/null +++ b/warmUp11.js @@ -0,0 +1,30 @@ +// 1-Create arrays in the global scope consisting of strings that represent: +// -name of females in your class +// -name of males in your class +// -name of your class instructors +<<<<<<< HEAD +var femalesName = ["Ranoua", "Khaoula", "Reem", "Hiba", "Amal"]; +var malesName = ["Bassem", "Charaf", "Ahmed", "Moez", "Oussama", "Firas"] +var classInstructors = ["Farouk", "Omar", "Hashem", "Seif", "Houda", "Dhia", "Insaf"] + +// 2-write a function that takes an array as an argument and returns the element that is located in the middle of that array. +function middle (array) { + var x = array.length ; + if (x % 2 === 0) { + return false + } + return array[(x-1)/2]; +} +// 3-Change all the numbers in the array to be multiplied by two for even indexes. +function multiplyEven (array) { + for (var i = 0 ; i < array.length ; i+=2) { + array[i] *= 2 ; + } + return array ; +} +======= + +// 2-write a function that takes an array as an argument and returns the element that is located in the middle of that array. + +// 3-Change all the numbers in the array to be multiplied by two for even indexes. +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c diff --git a/warmUp12.js b/warmUp12.js new file mode 100644 index 0000000..7103a28 --- /dev/null +++ b/warmUp12.js @@ -0,0 +1,37 @@ +// 1-Write a function that takes a string as an input and returns the reverse of each letter +//followed by a number starting from zero(solve it using while loop). +// example: reverseStr('hello'); "o0l1l2e3h4" +<<<<<<< HEAD +function reverseStr(str) { + var array = [] ; + var j = 0 ; + var arr = str.split('') + var i = arr.length - 1 ; + while (i >= 0 ) { + array[j] = arr[i] + array[j+1] = j/2 ; + i--; + j += 2; + } + return array.join('') ; +} +// 2-write a function that takes array of strings and returns an array of the strings that have the same length +// example : ['hi','hello','welcome','hy'] == > ["hi","hy"] +function sameLength (arr){ + var array = [] ; + for (var i = 0 ; i < arr.length ; i++) { + for (var j = i + 1 ; j < arr.length ; j++) { + if ( arr[i].length === arr[j].length ) { + array[0] = arr[i]; + array.push(arr[j]); + + } + } + } + return array ; +} +======= + +// 2-write a function that takes array of strings and returns an array of the strings that have the same length +// example : ['hi','hello','welcome','hy'] == > ["hi","hy"] +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c diff --git a/warmUp13.js b/warmUp13.js new file mode 100644 index 0000000..bb7a30c --- /dev/null +++ b/warmUp13.js @@ -0,0 +1,47 @@ +// Style your code and explain it step by step before jumping to code :D +// Read carefully, focus and test your code :) ... /\ HaPPy HaCkInG /\ + +// 1-implement the function mult that takes a single parameter n, and computes the multiplication of all integers up to n +//starting from 0, e.g.: +// mult(3); // => 6 +// mult(4); // => 24 + +<<<<<<< HEAD +// i used a for loop so the counter variable i declared keeps increasing by 1 and multply all integers from 1 up to n + +function mult (n) { + if (n === 0) { + return 0 ; + } + var total = 1 ; + for (var i = 1 ; i <= n ; i++) { + total *= i + } + return total ; +} + +======= +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c +// 2- Use a while loop to build a single string with the numbers 1 through n +// separated by the number next to the current number. +//Have it return the new string. +// eg= 1 2 2 3 3 4 4 5 5 6 6 ... +<<<<<<< HEAD + +// i declared an array to put my values in it ... then i used join(' ') to transform it to a string with space between each two characters +//i added two counter variables j and i ... j moves from index to index+2 ... and i the value assigned to each index +function buildString (n) { + var i = 1 ; + var j = 1 ; + var arr = [] ; + arr[0] = 1 ; + while (i < n) { + arr[j] = i + 1 ; + arr[j+1] = i + 1 ; + i++; + j += 2 ; + } + return arr.join(' ') ; +} +======= +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c diff --git a/warmUp14.js b/warmUp14.js new file mode 100644 index 0000000..1abe029 --- /dev/null +++ b/warmUp14.js @@ -0,0 +1,30 @@ +// Style your code and explain it step by step before jumping to code :D +// Read carefully, focus and test your code :) ... /\ HaPPy HaCkInG /\ + +//create a function isSubset that should take two arrays and determine whether the second array is a subset of the first array. +//For example: + +// array: [ 1, 2, 3, 4 ], sub:[ 2, 3, 4 ] => true +// array: [ 2, 2, 2, 3, 4 ], sub:[ 2, 4, 3 ] => true +// array: [ 2, 3, 3, "a" ], sub:[ 3, 3, 3, "a" ] => false +<<<<<<< HEAD + +// i used 2 loops 1 for array and 1 for sub to check if each element in sub is found in array ... if its found i delete it and i exit the loop with (break) +// if the loop was not broken thats mean the element was not found in array so i return false ... otherwise i return true +function isSubset (array,sub) { + var j = 0 ; + for (var i = 0 ; i < sub.length ; i++) { + for (var j = 0 ; j < array.length ; j++) { + if ( sub[i] === array[j]) { + delete array[j] ; + break; + } + } + if (j === array.length) { + return false + } + } + return true +} +======= +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c diff --git a/warmUp15.js b/warmUp15.js new file mode 100644 index 0000000..e8ad8ea --- /dev/null +++ b/warmUp15.js @@ -0,0 +1,27 @@ +// 1-using + operator combine your partner first and last name . +var firstName = 'Wala' ; +var lastName = 'Nour' ; +var fullName = firstName + ' ' + lastName ; + +// 2-find if the number 13 is a multiple of 3 or not. +13 % 3 === 0 ? "13 is a multiple of 3" : "13 is not a multiple of 3" ; + +// 3-calculate the average age of the follwing ages [13,14,13,15,16,17,19,13,16,15] +var arr = [13,14,13,15,16,17,19,13,16,15] ; +function average(arr) { + var sum = 0 ; + for (var i = 0 ; i < arr.length ; i++){ + sum += arr[i] ; + } + return sum / arr.length ; +} + +average(arr) + +// 4-calculate your age in seconds. +var age = 28 +function ageInSeconds (age) { + return age * 365 * 24 * 60 * 60 ; +} + +ageInSeconds (age) diff --git a/warmUp2.js b/warmUp2.js new file mode 100644 index 0000000..e90b78e --- /dev/null +++ b/warmUp2.js @@ -0,0 +1,45 @@ +// 1 - Complete the function cube that returns the cube of x: + +function cube(x) { + return (x * x * x) ; +} + +// 2 - Write a function sameLength that accepts two strings as arguments, and returns true if those strings have the same length, and false otherwise. + +function sameLength(string1, string2) { + if (string1.length === string2.length) { + return true ; + } + return false ; +} + +// 3 - Write a function called scoreToGrade that accepts a number as a parameter and returns a string representing a letter grade corresponding to that score. + +function scoreToGrade(number) { + if (number > 90 && number <= 100) { + return "A" ; + } + else if (number > 80 && number <= 90) { + return "B" ; + } + else if (number > 70 && number <= 80) { + return "C" ; + } + else if (number > 60 && number <= 70) { + return "D" ; + } +} +// USE RECURSION +// Repeating a String n Times: Let's write a function called repeatString that takes two parameters: a string str, which is the string to be repeated, and count -- a number representing how many times the string str should be repeated +// repeatString('dog', 0); // => '' +// repeatString('dog', 1); // => 'dog' +// repeatString('dog', 2); // => 'dog' + 'dog' => 'dogdog' +// repeatString('dog', 3); // => 'dog' + 'dog' + 'dog' => 'dogdogdog' + +function repeatString(str, count) { + if (count === 0) { + return '' ; + } + count-- ; + return str += repeatString(str, count) +} \ No newline at end of file diff --git a/warmUp3.js b/warmUp3.js new file mode 100644 index 0000000..3c2af5a --- /dev/null +++ b/warmUp3.js @@ -0,0 +1,87 @@ +// 1 - Write functions larger and smaller that each accept two strings as arguments, and return the larger and smaller strings, respectively +<<<<<<< HEAD + +function larger (str1,str2) { + if (str1.length > str2.length) { + return str1 + } + return str2 +} + +function smaller (str1,str2) { + if (str1.length > str2.length) { + return str2 + } + return str1 +} + +// 2 - Write a function called counter that, when invoked, always returns a number that is one more than the previous invocation. For instance: +var newNumber; + +function counter(n){ + return newNumber = (n + 1); +} + +======= + +// 2 - Write a function called counter that, when invoked, always returns a number that is one more than the previous invocation. For instance: +// function counting(n) { +// TODO: your code here +// } +// counting(5); // => '1, 2, 3, 4, 5' +// counting(1); // => '1' +// counting(3); // => '1, 2, 3' +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c + +// 3 - Meet & Greet: n numbers are coming to a party for numbers. Introduce them each to all the guests as they arrive. You should end up with output looking something like this one for n = 5 +// welcome 1 +// welcome 2, meet 1 +// welcome 3, meet 1 and 2 +// welcome 4, meet 1, 2 and 3 +// welcome 5, meet 1, 2, 3 and 4 +// + +<<<<<<< HEAD +function meetAndGreet(n) { + var counter = 1; + var x; + var total = ''; + while (counter <= n) { + if (n === 1) { + total = 'welcome ' + counter + } else if (counter === 1) { + total = 'welcome ' + counter + ' '; + } else { + total = total + 'welcome ' + counter + ', ' + 'meet '; + x = 1; + while (x < counter) { + if (x === counter - 2) { + total = total + x + ' and '; + } else if (x === counter - 1) { + total = total + x; + } else { + total = total + x + ', '; + } + x += 1; + } + total = total + ' ' ; + } + counter += 1; + } + return total; + } +// 4- Write a function shortestWord that works like longestWord, but returns the shortest word instead. + +function shortestWord (str) { + var array = str.split(' ') ; + var string = array[0] + for ( var i = 0 ; i < array.length ; i++) { + if (array[i].length < string.length ) { + string = array[i] ; + } + } + return string ; +} +======= +// 4- Write a function shortestWord that works like longestWord, but returns the shortest word instead. +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c diff --git a/warmUp4.js b/warmUp4.js new file mode 100644 index 0000000..ece5c40 --- /dev/null +++ b/warmUp4.js @@ -0,0 +1,28 @@ +// 1-write a function that returns the product of any number by 3. + +<<<<<<< HEAD +function product3 (number) { + return number * 3 ; +} +// 2-complete the following function multiply to return the result of multiplying of x and y +function multiply (x,y) { + return x * y ; +} +// 3-complete the following function that Convert Fahrenheit to Celsius if the module for converting is +// (5/9) * (fahrenheit-32); +function Convert (fahrenheit) { + return (5/9) * (fahrenheit-32) ; +} + +// 4-Define a function named "sqArea", and make it display square area if you knew the length of its side. +function sqArea (a) { + return a * a ; +} +======= +// 2-complete the following function multiply to return the result of multiplying of x and y + +// 3-complete the following function that Convert Fahrenheit to Celsius if the module for converting is +// (5/9) * (fahrenheit-32); + +// 4-Define a function named "sqArea", and make it display square area if you knew the length of its side. +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c diff --git a/warmUp5.js b/warmUp5.js new file mode 100644 index 0000000..08e7d82 --- /dev/null +++ b/warmUp5.js @@ -0,0 +1,82 @@ +// 1) Write a function named greaterNum that: +// - takes 2 arguments, both numbers. +// - returns whichever number is the greater (higher) number. +// ex greaterNum(5, 10) => "The greater number of 5 and 10 is 10." +<<<<<<< HEAD +function greaterNum (num1,num2) { + return (num1 > num2) ? "The greater number of "+num1+" and "+num2+" is "+num1+"." + : "The greater number of "+num1+" and "+num2+" is "+num2+"."; +} +======= + +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c + +// 2) Write a function named isEven using for loop that +// - iterate from x to y. +// - return array contain the even values, +// ex: isEven(1,10) => [2,4,6,8,10] + +<<<<<<< HEAD +function isEven(x, y) { + var array = [] ; + for (var i = 0 ; x <= y ; x++) { + if (x % 2 === 0) { + array[i] = x ; + i++; + } + } + return array ; +} + +// } +======= +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c +//3) write a function named sum that +// - Use a while loop to add up the numbers from x to y. +// ex sum(1,5) => 15 + +<<<<<<< HEAD +function sum (x,y) { + var sum = 0 ; + while (x <= y ) { + sum += x ; + x++; + } + return sum ; +} +======= +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c + +//4) Write a function named factorial that +// - Use Recursion to calculate the factorial of a number +// - the factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n +// - 5! = 5*4*3*2*1 = 120 +// ex : factorial(5) => 120 + +<<<<<<< HEAD +function factorial(n){ + return (n === 1 || n === 0) ? 1 : n*factorial(n-1) ; + }; + +======= +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c +//5) write a function named decimals +//- the function will format a number up to specified decimal places +//- the function will return a string +//- if the parameters not a number return false +// ex : +// decimals(2100, 'a') ==> false +// decimals('a', 5) ==> false +// decimals(2.100212, 2) ==> '2.10' +// decimals(2.100212, 3) ==> '2.100' +// decimals(2100, 2) ==> '2100.00' +// +<<<<<<< HEAD +function decimals (x,y) { + if (typeof x !== 'number' || typeof y !== 'number') { + return false ; + } + return x.toFixed(y) +} +======= +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c diff --git a/warmUp6.js b/warmUp6.js new file mode 100644 index 0000000..b9aa22f --- /dev/null +++ b/warmUp6.js @@ -0,0 +1,44 @@ +// Style your code and explain it step by step before jumping to code :D +// Read carefully, focus and test your code :) ... /\ HaPPy HaCkInG /\ + +// 1-Define a function called myTrueFun that returns true whenever its called. +<<<<<<< HEAD +// i wrote a function without parameters and i returned true +function myTrueFun () { + return true +} + +// 2- Define a function called color in which returns true if type of the input is string and returns false otherwise. +// i added a condition that check if the type of the value i entered is string or not and i returned true or false +function color (string) { + return (typeof(string) === 'string' ? true : false) +} +// 3-Write a JavaScript function that accepts a number as a parameter and check if the number is prime or not. +// i added a for loop to check if the rest of my number divided by all numbers less than it is equal to 0 or not ... if it is +// so the number is not a prime if its not so the number is a prime +function Prime (number) { + if (number === 1) { + return number + " is not Prime" + } + for (var n = number-1 ; n > 1; n--) { + if (number % n === 0) { + return number + " is not Prime" + } + } +return number + " is prime" +} +// 4-write a function that accepts two numbers as parameters and returns true if the two parameters have the same value , false if not +// i compared the two parameters if they are equal i returned true if they are not i returned false +function sameValue (a,b) { + return (a === b) ? true : false ; +} +======= + +// 2- Define a function called color in which returns true if type of the input is string and returns false otherwise. + + +// 3-Write a JavaScript function that accepts a number as a parameter and check if the number is prime or not. + +// 4-write a function that accepts two numbers as parameters and returns true if the two parameters have the same value , false if not + +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c diff --git a/warmUp7.js b/warmUp7.js new file mode 100644 index 0000000..d79e2f8 --- /dev/null +++ b/warmUp7.js @@ -0,0 +1,46 @@ +// 1-Choose the correct comparison operator to display "true", when: 5 is less than 7. +<<<<<<< HEAD +//answer : + +console.log (5 < 7) ; +======= +//answer : 5 < 7 ? true : false; +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c + +//2- Write a function named helloWorld that: +//takes 1 argument, a language code (e.g. "fr", "es", "en") +//returns "Hello, World" for the given language, for atleast 3 languages. It should default to returning English. +//ex: helloWorld('fr') ==> 'Bonjour tout le monde' +// helloWorld('es') ==> 'Hola, Mundo' +// helloWorld('') ==> 'Hello, World' +<<<<<<< HEAD +function helloWorld (code) { + if (code === "fr") { + return 'Bonjour tout le monde' ; + } + else if (code === "es") { + return 'Hola, Mundo' ; + } + else if (code === "ar") { + return 'صباح الخير للجميع' ; + } + return 'Hello, World' ; +} + +//3- write a function to Reverse an array without use array.reverse() method: +// ex: reverseArray([1,2,3]) ==> [3,2,1] +function Reverse (array) { + var j = 0 ; + var arr = []; + for (var i = array.length-1 ; i >= 0 ; i--) { + arr[j] = array[i] ; + j++; + } + return arr ; +} +======= + + +//3- write a function to Reverse an array without use array.reverse() method: +// ex: reverseArray([1,2,3]) ==> [3,2,1] +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c diff --git a/warmUp8.js b/warmUp8.js new file mode 100644 index 0000000..ad29cdb --- /dev/null +++ b/warmUp8.js @@ -0,0 +1,40 @@ +// 1 - Write a function named objKey that take an object as a parameter and returns an array containing the keys of the object +// objKey({name:'ahmed',age:20}) ==> ['name','age'] + +<<<<<<< HEAD +function objKey (obj) { + return Object.keys(obj) ; +} + +// 2 - Write a function named objLength to get the length of a JavaScript object +// objLength({name:'ahmed',age:20}) ==> 2 +function objLength (obj) { + var arr = [] ; + var i = 0 ; + for (var key in obj) { + arr[i] = obj.hasOwnProperty(key) ; + i++; + } + return arr.length ; +} + +// 3 - Write a function named objSort to sort an array of JavaScript objects based on the id +// objSort([{id:2,value:50},{id:0,value:70},{id:1,value:40}]) ==> [{id:0,value:70},{id:1,value:40},{id:2,value:50}] +function objSort (array) { +var arr = [] + for (var j = 0 ; j < array.length ; j++) { + for (var i = 0 ; i < array.length ; i++) { + if ( array[i].id === j ) { + arr[j] = array[i] ; + } + } + } + return arr ; +} +======= +// 2 - Write a function named objLength to get the length of a JavaScript object +// objLength({name:'ahmed',age:20}) ==> 2 + +// 3 - Write a function named objSort to sort an array of JavaScript objects based on the id +// objSort([{id:2,value:50},{id:0,value:70},{id:1,value:40}]) ==> [{id:0,value:70},{id:1,value:40},{id:2,value:50}] +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c diff --git a/warmUp9.js b/warmUp9.js new file mode 100644 index 0000000..2fa6901 --- /dev/null +++ b/warmUp9.js @@ -0,0 +1,61 @@ +// Style your code and explain it step by step before jumping to code :D +// Read carefully, focus and test your code :) ... /\ HaPPy HaCkInG /\ + +//1. Write a JavaScript function to check whether an `input` is an array or not +// ex isArray([1,2])=>true +// isArray(5)=>false +<<<<<<< HEAD +// i used the isArray method to determine whether the passed value is an Array or not +function isArray(arr) { + return (Array.isArray(arr) ); +} +======= +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c + +// **************** git status **************** +// **************** git add fileName.js **************** +// **************** git status **************** +// **************** git commit -m "your message" **************** +// **************** git status **************** +// **************** git push origin master **************** + +//2-Write a JavaScript function to get the first n element of an array. +//ex first([1,2,3],1)=>[1] +// first([1,2,3,4]2)=>[1,2] +<<<<<<< HEAD +// i used a for loop for my new array to put every element in the passed array to my new array until i reach the index num-1 +function first (array,num) { + var arr = [] ; + for(var i = 0 ; i < num ; i++) { + arr[i] = array[i] ; + } + return arr ; +} +======= + +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c + +// **************** git status **************** +// **************** git add fileName.js **************** +// **************** git status **************** +// **************** git commit -m "your message" **************** +// **************** git status **************** +// **************** git push origin master **************** + +//3- Write a JavaScript function to convert an object into a list of `[key, value]` pairs +//ex: convert({name:'ahmed',age:20})=>[['name','ahmed'],['age', 20]] +<<<<<<< HEAD +// i used the Object.entries method to put every key and his value in a new array +function convert(obj) { + var arr = Object.entries(obj) + return arr; +} +======= + +>>>>>>> f7116e6bad742d738191118e716e7a8f26aa143c +// **************** git status **************** +// **************** git add fileName.js **************** +// **************** git status **************** +// **************** git commit -m "your message" **************** +// **************** git status **************** +// **************** git push origin master ****************