BharatPe Frontend Interview Experience

BharatPe Frontend Interview Experience

Position: SDE - 3 (Frontend) Round 1

I recently interviewed with Bharatpe, and here is the information I can provide, structured with questions and their respective answers.

Question 1: Mention a few ES6 Features.
Question 2: Explain and code the features mentioned.
Question 3: Difference between arrow and regular functions through code as well as theory.
Question 4: Explain debouncing through code.
Question 5: Difference between debouncing and throttling as well as their respective use cases

Question 6: Difference between REST and SPREAD operators
Question 7: Output Based Questions

I.
function myFun(a, ...manyMoreArgs, b) {
console.log("a", a);
console.log("b", b);
console.log("manyMoreArgs", manyMoreArgs); }
myFun(1,2,3,4)

II.

function func1(){ setTimeout(()=>{
console.log(x);
console.log(y); }, 3000);
var x = 2; let y = 12; }
func1();

III.
for (var i = 0; i < 3; i++) {
setTimeout(function log() {
console.log(i); // What is logged? }, 1000);}

Question 8: Difference between React and Next?
Question 9: Write a program in React to increase a counter on buttonClick.

import React, { useState } from 'react';
import './style.css';

export default function App() {
  const [count, setCount] = useState(0);
  const handleClick = () => {
    setCount(count+1);
  }
  return (
    <div>
      <button onClick={handleClick}>Click Me!</button>
      <br />
      {count}
    </div>
  );
}

Thank you for Reading!