Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions Week6.js
Original file line number Diff line number Diff line change
@@ -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');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should still keep the quote in the string!

You can escape the quote like this:

console.log('I\'m awesome');

Or use double quotes for your outer quotes like this:

console.log("I\'m awesome");



/*
//Q3
let age;
console.log ('You still Young, your age is:');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😄
the instructions were asking you what you think the value of age is on line 17 before you give it a value.

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 = ('');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An array uses square brackets. Declaring an empty array would be this:

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);