diff --git a/Week6.js b/Week6.js new file mode 100644 index 0000000..0d42d7c --- /dev/null +++ b/Week6.js @@ -0,0 +1,121 @@ + +// Q1 +//console.log('Hello world!'); +//console.log('!مرحبا بالعالم'); +//console.log('Saluton mondo'); +//console.log('Hej världen!'); +//console.log('Selam Dünya!'); +//console.log('ہیلو ورلڈ!'); +//console.log('Aloha kākou honua!'); + +//Q2 +//console.log('Im awesome'); + + +/* +//Q3 +let age; +console.log ('You still Young, your age is:'); +age = 33; +console.log (age); +console.log ('your age is '+age+' years, 5 month, 11 days '); +*/ + + +//Q4 +/* +var definition; +definition = ('a method to determines whether a string contains the characters of a specified string'); +console.log(definition); +definition = ('This method returns true if the string contains the characters, and false if not.'); +console.log(definition); +*/ + + +//Q5 +/* +let exchangeRate; +exchangeRate = 7.25 +console.log(exchangeRate); +var roundNumber +roundNumber = Math.round(exchangeRate); +console.log(roundNumber); +var hightNumber +hightNumber = Math.max(exchangeRate, roundNumber); +*/ + + + + +//Q6 +/* +var petStore = (''); +console.log(petStore); +console.log('The Array above is undefined') + +var preditors = ["Tigers", "Lions", "Bears"]; +console.log(preditors); +preditors.push ("Wolves"); +console.log(preditors); +*/ + +//Q7 +/* +let myString +myString = ("this is a test") +var L= myString.length; +console.log(L) +*/ + + +//Q8 +/*let x = 7 +x = x%3 +console.log(x) +*/ + + + +//Q9 + +/*var activities = [['Work', 8], ['Eat', 2], ['workout', 2], ['Play Game', 2], ['Sleep', 7]]; +console.log(activities); + +if (6/0 === 10/0) { + console.log("Let's call it Infinity!")};*/ + + + +//Q10 +/* +const grid = [[0, 1], [1, 1], [2, 1], [3, 1]]; +console.log(grid[2]); +*/ + + +//Q11 +/* +let counter = 0; +console.log(counter); + +counter = counter + 2; +console.log(counter + '/First Method'); + +counter = counter ++; +console.log(counter + '/Second Method'); + +console.log(counter++ + '/third Method'); +*/ + + + +//Q12 +/* +const Ash = { + name: 'Thomas', + age: 1, + color: 'orange', + bestFriend: 'OLE', + favoriteFood : 'wet Food' +} +conole.log (Ash);