// Number of object properties
function propCount(obj) {
    var ctr = 0;
    for (var prop in obj)
        ++ctr;
    return ctr;
}

function deepEqual(obj1, obj2) {
    if (typeof obj1 == "object" && obj1 != null &&
        typeof obj2 == "object" && obj2 != null)
    {
        if (propCount(obj1) !== propCount(obj2))
            return false;
        for (var prop in obj1) {
            if (! prop in obj2)
                return false;
            if (deepEqual(obj1[prop], obj2[prop]) === false)
                return false;
        }
        return true;
    }
    else
        return obj1 === obj2;
}

@@ -1,138 +1,4 @@
-// Number of object properties%0Afunction propCount(obj) %7B%0A    var ctr = 0;%0A    for (var prop in obj)%0A        ++ctr;%0A    return ctr;%0A%7D%0A%0A
 func
@@ -46,17 +46,17 @@
 of obj1 
-=
+!
 = %22objec
@@ -62,26 +62,26 @@
 ct%22 
-&&
+%7C%7C
  obj1 
-!
+=
 = null 
-&&
+%7C%7C
 %0A   
@@ -97,17 +97,17 @@
 of obj2 
-=
+!
 = %22objec
@@ -113,17 +113,17 @@
 ct%22 
-&&
+%7C%7C
  obj2 
-!
+=
 = nu
@@ -144,74 +144,42 @@
     
-if (propCount(obj1) !== propCount(
+return obj1 === 
 obj2
-))
+;
 %0A    
-        return false;
+%7D else %7B
 %0A   
@@ -187,64 +187,93 @@
     
-for (var prop in obj1) %7B%0A            if (! prop in obj2)
+if (Object.keys(obj1).length != Object.keys(obj2).length) %7B%0A            return false;
 %0A   
@@ -273,32 +273,34 @@
 se;%0A        
+%7D%0A
         
 return false
@@ -283,37 +283,60 @@
   %7D%0A        
-return false;
+for (let key of Object.keys(obj1)) %7B
 %0A           
@@ -340,16 +340,31 @@
     if (
+!(obj2%5Bkey%5D && 
 deepEqua
@@ -374,20 +374,19 @@
 bj1%5B
-prop
+key
 %5D, obj2%5B
 prop
@@ -385,41 +385,15 @@
 bj2%5B
-prop%5D) === false)%0A               
+key%5D)))
  ret
@@ -444,45 +444,6 @@
   %7D%0A
-    else%0A        return obj1 === obj2;%0A
 %7D%0A

Add Chapter 04, exercise 4