Work About Team Blog Tutorials FAQ
Book a discovery call → Chat on WhatsApp

Home / Blog / React & Frontend / React JS Interview(Part-2)

javascriptreactinterviewwebdev

React JS Interview(Part-2)

💡
Cross-posted content: This article is also published on Dev.to. View original on Dev.to ↗

So this is the second blog post where I’m sharing some more important questions that you may stumble upon while giving a React JS or just a JS interview. Even if you don’t encounter any of these questions in your interview it will be good to check them out just for finding out how many of them you know well. Let’s start.

  • What is a pure function?
  • What is a HOC?
  • Give some examples of HOC you have used.
  • What is render props?
  • Custom Hooks?
  • Difference between Custom Hooks and Functions and Component?
  • Explain the working of Virtual DOM in detail.
  • What is reconciliation in react?
  • What are controlled and Uncontrolled components?
  • Which one is better-controlled or uncontrolled components?
  • What is Memoization and how it can be achieved in React?
  • Do you know what is a toolchain?
  • What is code splitting in React and how we can achieve it?
  • What is hoisting in JavaScript?
  • What is the difference between Array.forEach() and Array.map()?
  • Explain event loop?
  • Name one JS engine.
  • Is Javascript Object Oriented? If not then what type it is?

Some JS snippets to try:

Snippet1

let a = [1,2,3,4,5]
let b = a
b[3] = 10
let c = b
console.log(a,b,c)
//Output: ??
Snippet2


let obj1= {name:"atul", age:24, 
           hobbies:['reading books', 
           'writing blogs','exercising', 'poetry']}
let obj2 = obj1
delete obj2['hobbies']
console.log(obj1, obj2)
Snippet3


const aa  = 5
const bb = [12,23,543,56]
const cc = {name: "atul", age:24}
ac= 10 //What will happen? Is this Ok.
bb[3] = 9
bb[4] = 12
cc['Age'] = 'greater than 18'
Snippet4


let myself = {
  name: "atul",
  age: 24,
  hobbies: ["reading books", "writing blogs", "exercising", "poetry"],
  favourites: {
    movies: ["Iron Man", "End Game", "Spiderman"],
    Sports: ["Cricket", "Football", "Basketball", "Badminton"],
    song: ["Legends Never Die", "Chidiya: Vilen", "etc", "etc..."]
  }
};

let yourself = { ...myself };
yourself["hobbies"] = ["Guitar playing", "playing football", "Dancing"];

let newSelf = {
  ...myself
};
newSelf.favourites.movies = ["Star Wars", "Ice Age", "Batman", "Flash"];

console.log("myself:", myself);
console.log("yourself:", yourself);
console.log("newself", newSelf);

Here is link to all the questions asked above with implementation, so that you don’t feel slacking off with what will happen in each case.

I will be ending this article here for now. I'll continue it in the next part with more questions that will cover more in-depth questions. So see you around here next time.👋 Have an insightful day 😄.


Originally published at Klickspell Engineering

Full-Stack Web Engineering

Need technical precision for your web stack?
Architected for performance & scale.

From modern headless commerce to enterprise infrastructure and clean frontend state systems, Klickspell delivers senior engineering craft without agency bloat.

Book Free Technical Call → Explore Headless Engineering ↗

Keep Reading

Related Engineering Articles

reactjavascript

React Interview - (Part 3)

So welcome🙂 again to another part of React Interview series. So we’re finally now into part-3. Before...

1 min read Read →
javascriptwebdev

5 Frequently used JS libraries for React

I've seen many interns that join my company who have just basic knowledge of JS and are starting to...

3 min read Read →

Technical Blog

Explore all 50+ engineering tutorials

All Articles ↗

Looking for custom
Shopify engineering craft?

Let's build
your store right.

Book a free 30-minute call. We'll talk through your store goals, timeline, and budget.

Free 30-min call · Discuss scope & budget

Book your free call → Chat on WhatsApp

The craft in every click.