My Journey as a Front-End Developer: Navigating Interviews and Challenges
Tags: frontend, javascript, interview, react
Published: 2024-01-12 16:37:54



## Introduction

Hello DEV community! 👋 I'm excited to share my experience and insights from the interview process I went through recently. As a budding Front-End Developer with just a 6-month internship under my belt, I faced a series of intriguing questions in my quest for the perfect role. In this post, I'll take you through some of the key challenges posed by various companies during the first and second rounds of interviews. Let's dive in!

### Interviewed Profile: Front-End Developer / React Developer
### Companies Interviewed: 3-4

## Questions

### **1. Core JavaScript Concepts:**
   - Promises
   - Async/Await concept
   - Map vs ForEach
   - Closures
   - Temporal Dead Zone / Hoisting
   - Scope in JavaScript
   - `var`, `let`, `const` difference


### **2. Core React Concepts:**
   - React Hooks
   - Keys in React
   - useEffect with different snippets
   - Virtual DOM
   - State and Props
   - React Lifecycle
   - Redux and why it's needed
   - Why Redux Toolkit Introduced
   - Redux cycle
   - What is Serverless Deployment (Not related to React)
   

### **3. Tricky JavaScript Questions:**
   - JavaScript `setTimeout` behavior with `let` and `var`.
     
        for (let i = 1; i < 10; i++) {
           setTimeout(() =>
               console.log(i)
           , 1000)
         }
         for (var i = 1; i < 10; i++) {
            setTimeout(() =>
                console.log(i)
            , 1000)
           } 

   - Swap two numbers without using a new variable.

   - Position a div in the center of the screen
      ````
      html
      <div>hy</div>
      ````
      
   - Tricky array snippet questions 
     ````
     for example 
     let arr = [1, 2, 3];
     arr2 = arr
     arr[0] = 99;
     console.log(arr,arr2);
     ````

### **4. Full-Stack Developer Assignment:**
   As a part of the selection process for one of the companies, I was tasked with a comprehensive assignment. Here are some key aspects of the assignment:

   - **Task Timing:** 2 days
   - **Task Details:**
      1. Create a user form application using Django, Node.js, Go, or Ruby on Rails.
      2. Implement basic front-end validation and back-end phone number validation.
      3. Save form data, send an email to the submitter, and display submitted forms on a separate page.
      4. Deploy the application on a free cloud server and share the live link.
      5. Follow coding standards and use git for version control.
      6. Bonus points for writing tests.

   - **Tips and Requirements:**
      - Use Django Rest Framework for data serialization and validation.
      - Consider using Celery for asynchronous tasks (if applicable).

### **5. DSA Questions:**
   - Find the factorial of any given number using recursion.
   - Given an array arr[] of size N-1 with integers in the range 
     of [1, N], the task is to find the missing number from the 
     first N integers.
     Note: There are no duplicates in the list.
   - Reverse a string without using the built-in reverse function.
     ```for example
       input : i.like.difficult.task
       output : task.difficult.like.i
   - Count the occurrence of a given character in a string.
   - Find the largest and smallest elements in an array.

## Conclusion

Navigating through these interviews was a challenging yet enriching experience. Each question offered a unique opportunity to showcase my skills and knowledge. I hope my journey sheds light on the diverse range of topics one might encounter as a Fresher Front-End Developer during the interview process.

Wish me luck as I continue this exciting journey, and if you have any insights or advice, feel free to share them in the comments below! Let's grow together! 🚀