JavaScript Fundamentals Screen
CodingFrontendTechnical InterviewCS FundamentalsMediumLast asked 10 months ago
CIB interview question (Egypt) · stage: Technical Interview · domain: Coding, Frontend and CS Fundamentals · role: Software Engineer and Frontend Engineer · difficulty: Medium · asked once, last in November 2025
What they ask
For junior software roles the technical interview is a JavaScript fundamentals and problem-solving session, reported as roughly three theory questions and three problem-solving questions. Topics named by candidates: closures, scope, hoisting, the event loop, promises and async behavior, and basic data structures.
Theory questions in this area, for example:
- What does this print, and why: a
console.loginsidesetTimeout(..., 0), one insidePromise.resolve().then(...), and one at top level? - Why does a
varin a loop with closures print the same value, and how doletor an IIFE fix it? - What is hoisting for
var,let,constand function declarations?
Problem-solving sample (solve in the starter code): flatten a nested array of arbitrary depth without using Array.prototype.flat.
Examples
[1, [2, [3, [4]]], 5]returns[1, 2, 3, 4, 5].[[], [[]], 1]returns[1].
Constraints
- Up to
10^4total elements; depth up to 1,000 (so consider an iterative stack).
What they look for
- Explaining the event loop order out loud (call stack, microtasks, then macrotasks).
- Handling edge cases (empty arrays, non-array values) without prompting.
- Both a recursive and an iterative version if asked.