DEV Community

Discussion on: All front end Interview questions asked during my recent job hunt.

Collapse
kalbrecht_fr profile image
Kevin ALBRECHT

Hi, thank you for sharing this but can you explain your getHashCode implementation ?
I though you would compute some values, based on charCodeAt() and maybe bitwise operation or anything, to make it unique, but you simply returned the string instance.

Collapse
devabhijeet profile image
Abhijeet Yadav Author

I expected the same when the interviewer asked the question. However, on further follow up the interviewer asked me to only make a method by the same name available on the instance. Strange 😕

Collapse
kalbrecht_fr profile image
Kevin ALBRECHT

Oh ok weird, thank you.
great blogpost anyway :)