diff --git a/fares.js b/fares.js new file mode 100644 index 0000000..aee2751 --- /dev/null +++ b/fares.js @@ -0,0 +1,92 @@ +// Fares Arnous + +//Part 1 +console.log("Hellow world"); +console.log("أهلا بالعالم"); + + +//Part 2 +console.log('I\'m awesome'); + +//Part 3 +let age; +console.log("The value will be: undefined"); +console.log(age); +age = 32; +console.log("The value will be: 32"); +console.log(age); + + +//Part 4 +let name; +console.log("The value of name will be: undefined"); +console.log(name); +name = "Fares Arnous"; +console.log("The value of name will be: Fares Arnous"); +console.log(name); + +//part 5 +let number = 7.25; +console.log(number); +let roundedNumber = Math.round(number); +console.log(roundedNumber); +let highest = Math.max(number, roundedNumber); +console.log(highest); + +//Part 6 Arrays +let myArray; +console.log("The value of myArray will be undefined"); +console.log(myArray); +let favoriteAnimals = ["dog", "cat"]; +console.log(favoriteAnimals); +favoriteAnimals.push("kitten"); +console.log(favoriteAnimals); + +//Part 7 +let myString = "this is a test"; +console.log(myString); +let lengthOfMyString = myString.length; +console.log(lengthOfMyString); + + +//Part 8 +let x =7; +x = x%3; +console.log("The value of x will be: 1"); +console.log(x); + + +//Part 9 +let multipleTypeValue = [100, "Fares", 6.7]; +console.log(multipleTypeValue) + +let compare = 6/0 === 10/0; +console.log("The Vaule of compare will be : true") +console.log(compare); + +//part 10 +const grid = [[0, 1], [1, 1], [2, 1], [3, 1]]; +console.log(grid[2][1]); + + +//Part 11 +let counter = 0; +counter +=2; +console.log(counter); + +counter = counter + 2; +console.log(counter); + +counter++; +counter++; +console.log(counter); + +//Part 12 +const catName = "Prince"; +const bestFriend = "Thomas"; +const breed = "Domestic Shorthiair"; +const color = "Orange or Red Tabby"; +const catage = 1; +const sex = "male"; +const hair = "short"; +