← All videos

Engineering video

17:48 · 19 June 2024

JavaScript Mock Interview 2025 - Live Coding

Chapters 8 sections

  1. 0:00Introduction and Problem Overview
  2. 1:23Base Cases and Primitives
  3. 2:50Handling NaN
  4. 3:45Arrays and Recursion

Key concepts in this video:

1. Deep Object Comparison

Implementing a recursive function to compare primitives, arrays, and nested objects in JavaScript.

Watch section from 0:17 →

2. Primitive Values Comparison

Checking types and comparing non-object primitive values using standard equality.

Watch section from 1:30 →

4. Array Comparison via Recursion

Validating array types and lengths before iterating through elements with recursive deep equal calls.

Watch section from 3:54 →

5. Object Reference Equality

Explaining that objects in JavaScript are equal by reference unless pointing to the same memory location.

Watch section from 6:00 →

6. Object Property Iteration

Extracting object keys, verifying key lengths, and recursively comparing properties.

Watch section from 8:00 →

7. Date Object Comparison

Using instanceof checks and string conversion to correctly compare date objects that have hidden keys.

Watch section from 10:24 →

9. Arrays as Objects

Discussing how arrays are objects under the hood in JavaScript and the performance implications.

Watch section from 13:12 →

10. Live Coding Interview Strategy

Approaching interviews with a structured mindset, starting with simple base cases, and writing pseudo code.

Watch section from 14:47 →

Transcript

Today Bogdan is going to solve a very common JavaScript question elements get in live coding interviews. To keep it real, chat GPT and co-pilot are not allowed. Bogdan, I provided you with the starting boilerplate code and automated test, can you share your screen and let's get going. So what you see there, it's a function called deep equal. And that's what I want you to implement, I want you to implement a deep object function comparison in JavaScript.