Skip to content

Commit 2424d65

Browse files
committed
Week 2 homework tweaks
1 parent 7ac8510 commit 2424d65

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

Week3/MAKEME.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Homework Week 3 (moved over from Week 2)
22

3-
1. Create a function that takes two objects as parameters and compares them. You will actually need to write two functions - one that compares with `==` and one that compares with `===`. Remember that objects can have objects inside of them so you'll need to find a way to compare every element of every object (types and values). For example:
3+
1. Create a function that takes two objects as parameters and compares them. You will actually need to write two functions one that compares with `==` and one that compares with `===`. Remember that objects can have objects inside of them so you'll need to find a way to compare every element of every object (types and values). For example:
44

55
```js
66
var obj1 = {
@@ -21,6 +21,8 @@
2121
```
2222

2323
In our example we'll say that `obj1 == obj2` is `true` and `obj1 === obj2` is `false`. Make sure you can see why before you write any code!
24+
25+
Note: give this exercise your best shot but don’t spend more than, say, one hour on it.
2426

2527
2. We saw that we can pass functions as arguments to other functions. Your task is to write a function that takes another function as an argument and runs it.
2628

@@ -48,9 +50,9 @@
4850

4951
> Don't cheat! Seriously - try it first.
5052

51-
Check out this [Fiddle](http://jsfiddle.net/jimschubert/85M4z/)
53+
Check out this [Fiddle](http://jsfiddle.net/jimschubert/85M4z/). You need to open your browser’s Developer Tools to see the console output. Press the Run button in the upper right corner to run the code.
5254

53-
And this [Stack Overflow question](http://stackoverflow.com/questions/22395357/how-to-compare-two-arrays-are-equal-using-javascript)
55+
More insights from this [Stack Overflow question](http://stackoverflow.com/questions/22395357/how-to-compare-two-arrays-are-equal-using-javascript).
5456

5557
**Some freeCodeCamp challenges:**
5658

@@ -67,9 +69,9 @@
6769
var o2 = { foo: 'bar' };
6870
var o3 = o2;
6971
```
70-
Show that changing `o2` changes `o3` (or not) and changing `o2` changes `o3` (or not).
72+
Show that changing `o2` changes `o3` (or not) and changing ~~`o2` changes `o3`~~ `o1` changes `o3`(or not).
7173

72-
Does the order that you assign (`o3 = o2` or `o2 = o3`) matter?
74+
Does the order that you assign (`o3 = o2` or `o2 = o3`) matter? {Jim Cramer: ???}
7375

7476
### Some further reading:
7577

0 commit comments

Comments
 (0)