Skip to content

Latest commit

 

History

History
97 lines (68 loc) · 1.58 KB

diagnostic.md

File metadata and controls

97 lines (68 loc) · 1.58 KB

General Assembly Logo

Diagnostic

Question 1

Graces-MacBook-Pro:~ grace$ mkdir wdi
Graces-MacBook-Pro:~ grace$ cd wdi
Graces-MacBook-Pro:wdi grace$ pwd
/Users/grace/wdi
Graces-MacBook-Pro:wdi grace$ mkdir try
Graces-MacBook-Pro:wdi grace$ cd try
Graces-MacBook-Pro:try grace$

What is the full path to the current directory?

Replace this text with your answer.

Question 2

Describe GitHub, briefly in your own words.

Replace this text with your answer.

Question 3

(false || true) && (false && true);

Is the value of this expression true or false? Explain your answer.

Replace this text with your answer.

Question 4

var x = 1;
while (x < 5) {
  x = x + x;
}

How many times does the loop run? What's the value of x after the while loop?

Replace this text with your answer.

Question 5

var strangeAdd = function(a, b) {
  if (a > 0 || b > 0) {
    return a + b;
  }
  return a - b;
};

var result = strangeAdd(0, -5);

What is the value of result? Explain your answer.

Replace this text with your answer.

Question 6

var groceryList = [
  'a loaf a bread',
  'a container of milk',
  'a stick of butter',
];

What is the value of groceryList[2]?

Replace this text with your answer.

Question 7

var teamMember = {
  role: 'consultant',
  name: {
    given: 'Jason',
    surname: 'Weeks'
  },
  hobby: 'exercise'
};

What is the value of teamMember['hobby']? Of teamMember['name']? Of teamMember['name']['surname']?

Replace this text with your answer.