Delhivery | Fullstack Developer

388
Feb 19, 2023

Got a call from HR (I was active on Naukri and Linkedin so she might got my contact from there).
She asked basic questions:

  • Total experience (They did not count internship experience).
  • Currrent CTC
  • Relieving Date.
  • Tech stack I have worked on.

Then she fixed the interview after 4 days at evening on Google meet. I asked to tell me the topics for preparation. She said DSA, React.js, Express.js and Typescript.

The interview went for about more than 1 hour.

  • Tell me about yourself.
  • Asked questions from my CV.

She asked in which (frontend or backend) you are more comfortable. I said frontend (because most of the time I am working on frontend in current company so I was more confidant in that). Then she started asking questions from React.js.

  • How to pass data from parent component to child component and vice versa.
  • Why react has virtual dom, why cannot we update real dom directly and how react updates the real dom.
  • Why keys are required in list of tags and how react updates its state.
  • Tell me about useContext.
  • Tell me about useEffect.
  • What we send second parameter in useEffect, why it is required and what will happen if we do not write it.
  • Tell me about useCallback, useMemo and memo.
  • What will be the output of following code if we call the myFunc and why.
const [obj, setObj] = React.useState(10);

const myFunc = () => {
	console.log(obj);
	setObj(20);
	console.log(obj);
}

She asked whether I know Typescript, I said I know but not confidant so she started asking questions in Javascript.

  • What is wrong in the following code and write code to update size 18 to 20.
let s = {
	font: {
		color: 'grey',
		size: 18,
	},
	background: 'red'
}

const {...style} = s;
  • Write an algorithm to shuffle the elements of an array.
  • Tell me about let, var and const.
  • Given two functions, both having let, var and const with same name. Tell me about their scops or will it generate error.
  • Tell me the output of following code.
const myFunc = () => {
	return new Promise((res, rej) => {
		res(2);
		res(4);
		res(8);
	});
}
myFunc().then(res => console.log(res));
  • Tell me the output of following code.
const myFunc = () => {
	return new Promise((res, rej) => {
		res(2);
	});
}

myFunc()
	.then(res => {
		console.log(res);
		return res * 2;
	})
	.then(res => {
		console.log(res);
		return res * 2;
	})
	.finally(() => {
		console.log("Finally block");
	})
	.then(res => {
		console.log(res);
	});

Then she started asking about question on express.js.

  • Tell me the best practices that we should do in express.
  • What is cors. Tell me the code that we write to apply cors.

Finally she asked whether I have any questions.

Comments (3)