Skip to content

Instantly share code, notes, and snippets.

@sandrabosk
Created July 10, 2020 16:25
Show Gist options
  • Select an option

  • Save sandrabosk/d8b09fbf753340b281a2198980ea9889 to your computer and use it in GitHub Desktop.

Select an option

Save sandrabosk/d8b09fbf753340b281a2198980ea9889 to your computer and use it in GitHub Desktop.
  1. What is expected output and why?
const firstName = 'ivan';
const lastName = 'ivan';
console.log(firstName === lastName); // => ???

let currency = '$';
let currencyUS = currency;
console.log(currency == currencyUS); // => ???

let student = {
  firstName: 'marc',
  lastName: 'jackobs'
}

let ironhacker = student;
console.log(student === ironhacker); // => ???


const uniStudent = {
  firstName: 'marc',
  lastName: 'jackobs'
}

console.log(student === uniStudent); // => ???
  1. Copy the object 'chillStudent' into a new object 'coolStudent' using the for...in loop
const chillStudent = {
  firstName: 'ana',
  address: {
    nubmer: 1234,
    street: 'IronAvenue',
    city: 'Miami'
  }
}

const coolStudent = {};

// ... your code here

console.log(coolStudent.address.street); // => IronAvenue 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment