Summary
I interviewed for an SDE-2 Frontend role at Pragmatic Play, focusing heavily on JavaScript fundamentals and CSS layout. Despite addressing all questions, I was ultimately rejected with feedback citing weakness in Data Structures & Algorithms, which was unexpected given the frontend nature of the problems presented.
Full Experience
I recently had an interview for an SDE-2 Frontend position at Pragmatic Play. The first technical round was quite comprehensive, probing my knowledge of JavaScript fundamentals, DOM behavior, and CSS layout concepts. I faced several practical JavaScript coding challenges and theoretical questions about CSS properties and their applications. I felt I handled the frontend-specific questions well, demonstrating my understanding of core concepts. However, much to my surprise and confusion, the feedback indicated that I was rejected due to a perceived weakness in Data Structures & Algorithms, despite no explicit DSA problems being posed during the interview.
Interview Questions (6)
Explain the concept of hoisting in JavaScript, differentiating how var, let, const, and function declarations are handled. Consider the following code snippets and explain their behavior:
console.log(foo()); // Works
function foo() { return "Hello!"; }
console.log(bar()); // TypeError
var bar = function () { return "Hi!"; };
Explain the output of the following JavaScript code snippet and provide a solution to ensure it logs the expected sequence of values (0, 1, 2).
for (var i = 0; i < 3; i++) {
setTimeout(() => console.log(i), 0); // Actual Output: 3 3 3
}
Given a string, write a function countVovCons that returns the count of vowels and consonants. For example:
countVovCons("hello akash"); // Expected Output: 4 6
Given a string, write a function to reverse each word within the string while maintaining the original word order. For example:
const str = "Hello World"; // Expected Output: "olleH dlroW"
Explain the fundamental differences between CSS Flexbox and CSS Grid, and describe their primary use cases.
Describe the characteristics and differences between the CSS display properties: inline, block, and inline-block.