JavaScript Array Filter | filter Array Method | JavaScript Tutorial

Published: 25 November 2022
on channel: Azhar Techno Coder
168
36

JavaScript Array Filter | filter Array Method | JavaScript Tutorial

Code:
// method which creates an array of elements that pass the test provided by the function
//Scenario 1
const numbers = [1,2,3,4,5,6]
const even = numbers.filter(isEven)

function isEven(value){
return value % 2 !== 0
}

//console.log(even)
//Scenario 2
//filer method does not chnge the original array
const numbers2 = [1,2,3,4,5,6]
const even2 = numbers2.filter(isEven)

function isEven(value){
return value % 2 === 0
}

console.log(even2)
console.log(numbers2)
//Scenario 3
const People =[
{
name : 'A',
profession : 'SE',
age:25

},
{
name : 'B',
profession : 'Youtuber',
age : 15

},
{
name : 'C',
profession : 'BM',
age : 40

},
]

const filterByPro = People.filter(person =person.age=25)
console.log(filterByPro)

//Scenario 4
const num = [1,2,3,4,5,1,2,3,4,5,7,8]

const uniquenum = num.filter((value,index,arr)={
console.log(value+" : "+arr.indexOf(value)+" : "+index)
return arr.indexOf(value) === index;
});

console.log(uniquenum)

Chapters:
0:00 - Introduction to the video
0:19 - Scenario 1 of filter function
2:33 - Scenario 2 of filter function
3:16 - Scenario 3 of filter function
6:03 - Scenario 4 of filter function
9:21 - End tags and subscription to the channel

My second Channel:
WrestleTalkByAzhar -    / wrestletalkbyazhar  

Follow Insta:
  / kingazharjamal  
  / fari_digi  

One Card App Link to Apply:
https://1cardapp.page.link/88LF

Cred App Link to Apply:
https://app.cred.club/spQx/ud86uunq

Next Steps :

---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
Must Watch Playlists

► 1. Javascript -    • Javascript Factory  
► 2. Puppetter -    • Puppeteer  
► 3. Cypress -    • Cypress  
► 4. Tech works -    • Video  
► 5. Vbscript Basics To Advanced -    • VBScript Part 1 -  Features Advantage...  
► 6. Jmeter -    • Jmeter Tutorials  
► 7. Excel -    • Videos On Excel  
► 8. Appium -    • Appium  
► 9. Shares -    • Shares  
► 10. Javascript Interview Questions -   • Javascript Interview Questions  
► 11. C# Tutorials -    • C# Factory  
► 12. HTML & CSS -    • HTML & CSS  
► 13. Browser Console -    • Browser Console  
► 14. JSON -    • Videos on Json  
► 15. Specflow -    • Specflow Tutorials  
► 16. MongoDB -    • MongoDB Tutorials  
► 17. Postman -    • Postman  
► 18. Python -    • Python  
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------

#filter
#javascript
#javascriptfunctions


On this page of the site you can watch the video online JavaScript Array Filter | filter Array Method | JavaScript Tutorial with a duration of hours minute second in good quality, which was uploaded by the user Azhar Techno Coder 25 November 2022, share the link with friends and acquaintances, this video has already been watched 168 times on youtube and it was liked by 36 viewers. Enjoy your viewing!