loading...

Today's javascript interview questions

oathkeeper profile image Divyesh Parmar ・2 min read
let a = [1, 2, 3, 4, 5];
a = a.map(item => item<3);
let a = [1, 2, 3, 4, 5];
a = a.map(item => item<3);
let a = [1, 2, 3, 4, 5];
a = a.some(item => item< 3);

which he told will return the mixture of .map() and .filter() 's result :D

  • then question on writing a reducer function to return the sum of an array which I thnk I have wrote wrong
const sum = arr.reduce((total, value) => total + value, 0);

Redux

  • are Providers a Higher Order Components? there was no mention of Consumer and he took the mention of consumer with regards to how react-redux connect function works instead of how it works in Context API
  • what is actions in Redux
  • why is Reducer needed when we can directly mutate the state?

React

  • How much do you rate yourself in React :D :D :D :D
  • What is portal in React?
  • What are fragments in React?

HTML

  • How much do you rate yourself in HTML :D :D :D :D
  • What does HTML provide to do drag and drop? to which I only said I have used 3rd party libraries and never used the native solution provided by HTML.
  • Further question was how such libraries work behind the scenes and what code does it bring in to use HTML which I completely didn't know about.

Today's javascript interview questions. Honestly after giving many interviews I felt like this was a kiddy and useless interviews since I personally (don't know about generally) direct Google about such array methods to use. I pity and find it funny for myself that I couldn't answer upto the expectations, but because of the experience

I must say when someone asks you how much do you rate your self in this sexy tech library/feature
you know its going to be a pretty bad interview.Doesn't apply to interviews in other countries I guess

Posted on by:

oathkeeper profile

Divyesh Parmar

@oathkeeper

Game Of Thrones is real PERIOD Learning #Node.js, #express.js #JavaScript, #Python, #Reactjs #Redux

Discussion

pic
Editor guide
 

Can't agree more. However, I think it's always hard to find the right question to ask because the interviewer is between trying to find out how deeply dev knows the sexy tech and trying not to ask silly questions.

 

Just before this one I had a good interview the guy asked about how shallow clonning and deep clonning works. How Javascript runtimes allocates memory and why shallow clonning is more important in context of redux reducer also.

So that was a productive discussion also unlike this one.

 

That is a productive discussion indeed