🚀 React Interview Experience (August 2025): CapGemini(Part-1)
Overview
This case study presents a React developer interview experience at CapGemini in August 2025. The interview focused on assessing the candidate's understanding of core JavaScript concepts, including variable hoisting, scope, and immediately invoked function expressions (IIFEs), as well as React Router fundamentals.
Interview Rounds
The interview consisted of a series of technical questions designed to evaluate the candidate's knowledge and problem-solving abilities. The questions covered the following topics:
-
Question 1: Variable declaration and hoisting with
var.var a; console.log(a); a = 20; console.log(a); var a = 30;Expected Output:
undefined 20 -
Question 2: Variable declaration and scope with
let.let a; let a = 20; console.log(a);Expected Output:
SyntaxError: Identifier 'a' has already been declared -
Question 3: Variable declaration and initialization with
const.const a; a = 20; console.log(a)Expected Output:
SyntaxError: Missing initializer in const declaration -
Question 4: Variable declaration and initialization with
const(again).const a; console.log(a)Expected Output:
SyntaxError: Missing initializer in const declaration -
Question 5: Hoisting of functions and function expressions.
foo(); var foo = function() { console.log("foo"); } bar(); function bar() { console.log("bar"); }Expected Output:
TypeError: foo is not a function -
Question 6: Immediately Invoked Function Expressions (IIFEs) and semicolon insertion.
(function(){ console.log('abc'); })() ( () => { console.log('abc'); })();
Original Source
This experience was originally published on medium. Support the author by visiting the original post.
Read on medium