JavaScript Array Map | Array map() method in JavaScript
Code:
const num = [1,2,3,4,5,6,7,8,9,10,55]
//Scenario 1
num.map(mapCallabck);
function mapCallabck(item,index,arr){
return num
}
console.log(num)
//Scenario 2:
const doubleNumbers = num.map(mapCallabck);
function mapCallabck(item,index,arr){
return item*2;
}
console.log(doubleNumbers)
//Scenario 3
const ItemMultiplyIndex = num.map(mapCallabck);
function mapCallabck(item,index,arr){
return item*index;
}
console.log(ItemMultiplyIndex)
//Sceanrio 4
const Students =[
{
name:'A',
sno : 1,
marks : 70
},
{
name:'B',
sno : 2,
marks : 75
},
{
name:'C',
sno : 3,
marks : 80
},
]
const studentArray = Students.map(item=({
name:item.name,
marks:item.marks,
}))
console.log(studentArray)
//Scenario 5
const AmazonProducts =[
{
name:"Mobiles",
price:"10000",
count:20
},
{
name:"Laptop",
price:"30000",
count:30
}
]
const AmazonProductsArray = AmazonProducts.map(item=({
productname : item.name,
totalValue : item.price * item.count
}))
console.log(AmazonProductsArray)
//Scenario 6
const stringNum = ['1','2','3','4','a']
const numbers = stringNum.map(Number)
console.log(numbers)
Chapters:
0:00 - Introduction to the video
0:21 - Explanation with scenarios of Js map method
1:23 - Scenario 1 for map method
2:21 - Scenario 2 for map method
3:31 - Scenario 3 for map method
4:31 - Scenario 4 for map method
7:41 - Scenario 5 for map method
10:45 - Scenario 6 for map method
12:04 - End Tags and subscription to the channel
My second Channel:
WrestleTalkByAzhar - / wrestletalkbyazhar
Follow Insta:
/ kingazharjamal
/ fari_digi
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 Advantages Dis...
► 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
---------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------------------------------------------------------------
#map
#javascript
#javascriptfunctions
On this page of the site you can watch the video online JavaScript Array Map | Array map() method in JavaScript with a duration of hours minute second in good quality, which was uploaded by the user Azhar Techno Coder 08 November 2022, share the link with friends and acquaintances, this video has already been watched 169 times on youtube and it was liked by 36 viewers. Enjoy your viewing!