No video

JavaScript Interview Questions- Machine Coding - Most Asked Question

  Рет қаралды 5,401

Nisha Singla

Nisha Singla

Күн бұрын

Javascript Interview Question on objects and Array will be discussed in this video .
Watch the complete video till the end to understand it completely
Checkout my Instagram account to find the latest notes on React, Angular and Javascript.
Instagram handler Name: @nishasingla05
Watch complete video to understand in depth.
Support my channel by liking and sharing my videos so that I can reach to wider audience. Please share it in your network 🙏
►Checkout JavaScript Interview Playlist
• Frontend Interview Que...
►Checkout ES6 Playlist
/ playlistlist=plc8okhrv...
►Click here to Subscribe the channel:
studio.youtube....
►Angular Complete Course:
kzfaq.info....
►All important shorts videos:
kzfaq.info....
Connect with Me On Social Media
Facebook: / angularjs4be. .
LinkedIn: / nisha-sin. .
Instagram : / nishasingla05
Twitter: / nishasingla05
#nishasingla #javascript #interview

Пікірлер: 11
@PriyaHm-o4j
@PriyaHm-o4j 8 күн бұрын
Nice explanation. Thank you ❤
@pranavpawar7792
@pranavpawar7792 Жыл бұрын
Wow such a nice explanation... I really liked your approach and logic... Thanks Nisha
@amitbm3608
@amitbm3608 Жыл бұрын
Thank u for the awesome video. Please continue react tutorial and complete the series.
@VinitNeogi
@VinitNeogi Жыл бұрын
Should we use data.forEach instead of data.map as we are not concerned with return value of map function?
@websilt
@websilt Жыл бұрын
Another way to do this: const items = ["a", "b", "c", "a", "b", "b", "c", "d"]; const count = {}; for (const item of items) { if (count[item]) { count[item] += 1; } else { count[item] = 1; } } console.log(count);
@Aravind-mh5wh
@Aravind-mh5wh 2 ай бұрын
we can write using ternary operator like below let ar = ['a','s','s','b','c','a','c','d','a','s']; function arrOccurances(items){ let output = {}; items.forEach(item=>{ output[item] = output[item] ? output[item]+1 : 1 }) return output; } console.log(arrOccurances(ar)); (OR) let ar = ['a','s','s','b','c','a','c','d','a','s']; let output = {}; for(let item of ar){ output[item] = output[item] ? output[item]+1 : 1 } console.log(output) ; not only these ways, as Nisha said we have many ways to do it. Thanks Nisha :-)
@sivatirumani531
@sivatirumani531 Жыл бұрын
Nice Explanation
@DanielSparza
@DanielSparza Жыл бұрын
Thanks for do this kind of videos
@akiratoriyama1320
@akiratoriyama1320 Жыл бұрын
Thank you!!
@kavinkumar
@kavinkumar 6 ай бұрын
well if you cant use map , let arr=['a','b','z','a','b','a','c'] let obj={}; for (let key in arr) { console.log(obj[arr[key]],arr[key]); //undefined , a initially obj[arr[key]]?obj[arr[key]]=obj[arr[key]]+1:obj[arr[key]]=1; } console.log(obj) { a: 3, b: 2, c: 1, z: 1 }
@Aravind-mh5wh
@Aravind-mh5wh 2 ай бұрын
last line of code is repeated , so simply we can write like below obj[arr[key]] = obj[arr[key]] ? obj[arr[key]]+1 : 1;
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 3,5 МЛН
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 167 МЛН
Whoa
01:00
Justin Flom
Рет қаралды 48 МЛН
Prank vs Prank #shorts
00:28
Mr DegrEE
Рет қаралды 11 МЛН
Top 10 JavaScript Coding Interview Question and Answers
23:28
Interview Happy
Рет қаралды 75 М.
Whiteboard Coding Interviews: 6 Steps to Solve Any Problem
15:18
Fullstack Academy
Рет қаралды 367 М.
5 JavaScript Concepts You HAVE TO KNOW
9:38
James Q Quick
Рет қаралды 1,4 МЛН
10 JavaScript Interview Questions You HAVE TO KNOW
13:41
James Q Quick
Рет қаралды 55 М.
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 3,5 МЛН