Javascript Coding Interview Questions- You Must Know Them

preview_player
Показать описание
Learn this 5 Javascript coding interview questions that I heard hundred times on Javascript interviews during last 10 years. They are focus on basic javascript knowledge this is why they are being asked so often.

TIMESTAMPS
0:00 Most popular Javascript coding interview questions
0:27 Closures
2:09 Cloning objects
3:59 Count vowels inside a string
8:32 Reverse each word in a sentence
9:25 Most common string

FOLLOW ME

RECOMMENDED VIDEOS

MY COURSES
Рекомендации по теме
Комментарии
Автор

Object.assign and spread operator only work it you have a flat object like {a:1, b:2} But if you have nested object like {a:1, b:2, c:{d:3}} it will copy value of a and b but reference of c, d.
so, if you want to copy nested objects you can use "structuredClone(obj)" or

Vivek-Nishad
Автор

Regarding the clone example, be aware that these are shallow copies (they do not work correctly when the object contains other objects). If you need a deep copy you should use the new "structuredClone" api or the usual trick with

AndreaDragotta
Автор

for the last question..we can also do Object.entries(mapping).sort((a, b)=>a<b)[0] to directly fetch the most common string

n_fan
Автор

I am sooo grateful for this video!! I am a junior developer currently preparing for my tech interviews, and some of this stuff was difficult to understand while just reading a text explanation. Thank you for showing these examples step by step, these have helped me get a better understanding of the theory. ♥

SuperMatsumoto
Автор

I don't have words to fully express my gratitude. Closures, cloning are things I found hard to understand but your style of teaching made everything so simple to understand. Thank you so much and all the best❤👍👍👏

jonathanjohnson
Автор

As a Junior Developer your content helps me a lot to prepare for interviews and improve my logic
Thank you very much 👍

bendevweb
Автор

I really like your videos, you get straight to the point. Please make more videos like this one!

joeldaros
Автор

as for me reduce in the last example is too complicated to understand and debug. Nice for an interview but I would avoid such things in real code. I.e. if jun dev will have to work with that piece of code. In general good video, will look others on the channel too :)

dmytro-skh
Автор

I am addicted to your style of teaching .. : )

mohammadyousuf
Автор

For the first problem - I understand closures and you are returning a fucntion within the parent function that returns the secret. but Im curious - why not return the secret string directly instead of within the child function? its a const and its private to the someFn() and cant be modified once declared...

damienspectre
Автор

In the findVowels i would expect a senior developer would do it with an object because with includes that complexity is much higher.
With an object you can just iterate the string once and check each time if the char is a vowel with O(1) complexity

orz
Автор

Now just need to get an interview that asks one of these 5 questions...

jjjj
Автор

Круто! Дякую! Цікаво звідки Ви, Олександре?)

OliaYarukhina
Автор

Quick question. Currently building my portfolio projects. But I have no knowledge of data structures and algorithms. Should i start training after my portfolio will be completed? Or prior the portfolio?

leojohn
Автор

Hi,
For last question
To get element which have max occurrence:
After creating object, can we use .sort() nd do descending order based on Occurance nd then return first value from sorted object.

Is it correct?

testify
Автор

Why do we write acc[1] and el[1]? what is the index for and why is it always 1?

cryptopinky
Автор

at 3:50. I see it also work const clone=object. Is it a good practice?

dragosp.
Автор

Hi, Is there a document or a list of such interview questions that you have maintained?which I can follow?

amitkrishna
Автор

cant we solve the last question using Set?

sameoldsteven
Автор

The count vowels i just did not sure it was right, but worked on my examples :) fun questions :)

AndrewTSq