#5 - Array & 10 Most Important Arrays Functions in JavaScript

preview_player
Показать описание
In this video, I have explained: Array & 10 Important Arrays Functions in JavaScript
1. push
2. pop
3. shift
4. unshift
5. splice
6. slice
7. concat
8. indexOf
9. includes
10. forEach

Schedule a meeting in case of any queries/guidance/counselling:

~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:

Follow me on my Facebook Page:

Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:

Naveen AutomationLabs Paid Courses:
GIT Hub Course:

Java & Selenium:

Java & API +POSTMAN + RestAssured + HttpClient:
Рекомендации по теме
Комментарии
Автор

How beautifully you explained...Really loved your way.. thanks a ton..

abhilashadeshpande
Автор

Hi Naveen, please correct me if my understanding is not correct.
I think it looks only for the first value in includes(). If it is found then true, else false. It doesn't look for the second value in the includes().
Below is the example I tried :-
let person =["customer", "seller", "admin", "vendor"];
console.log(person.includes("consumer", "admin")); //false
console.log(person.includes("admin", "consumer")) // true.

peacelilly
Автор

Hi naveen Just a query how you are getting that line at 5:54 pause video, at 22nd line, Iam not getting it ? pls help

sumitgoyal
Автор

Just Adding one more scenario : Finding the indexOf nth occurrence of an element in an array. Might be helpfull for interview perspective and this code can be optimized
//Function to find to find the n-th index of an element in an array
let bigArray = ["Abdul", "Abdul", "Abdul", "Abdul", "Abdul", "test", "test", "Abdul"];
let nthIndex = findNthIndex(bigArray, "John", 6);
console.log(nthIndex);
function findNthIndex(arr, value, nthOccurance) {
let nthIndex = 0;
if (arr.length < nthOccurance) {
return -1;
}
if (nthOccurance <= 1) {
console.log("nthOccurance value should not be lesser than 1");
} else {
for (let i = 1; i < nthOccurance; i++) {
nthIndex = arr.indexOf(value, nthIndex + 1);
}
return nthIndex;
}

abdulRahman-idru
Автор

In this video, I have explained: Array & 10 Important Arrays Functions in JavaScript
1. push
2. pop
3. shift
4. unshift
5. splice
6. slice
7. concat
8. indexOf
9. includes
10. forEach

naveenautomationlabs
Автор

waiting for good explaination regarding forEach loop from your series

ganapatihiregange
Автор

Hello Navin, what is the total number of videos will be coming for this series to end? currently we are at 16.

chinmaay
Автор

Sir you missed map, filter, reduce method make a video on this topics

dangetiharibabu