Array map Method in JavaScript | JavaScript Array Methods | Beginners tutorial

🎁 Join my channel to get access to perks:
/ @codeexplained
🧡 Hello All JavaScript Lovers Outhere!
Today you're going to learn about the Array Object In JavaScript.
This tutorial is a series of videos, in each video we will discuss a method (or more) of the Array Object in JavaScript.
In today's video, you're going to learn about the map method.
map() creates a new array from calling a function for every array element.
map() calls a function once for each element in an array.
map() does not execute the function for empty elements.
map() does not change the original array.
🟢🟠 The Array.map().
🔷 Syntax :
// Callback function
map(callbackFn)
map(callbackFn, thisArg)
// Inline callback function
map(function(element) { /* … */ })
map(function(element, index) { /* … */ })
map(function(element, index, array){ /* … */ })
map(function(element, index, array) { /* … */ }, thisArg)
🔹callbackFn : Function to execute on each element.
The function is called with the following arguments:
🔹element : The current element being processed in the array.
🔹index : The index of element in the array.
🔹array : The array forEach() was called upon.
🔹thisArg (Optional) : Value to use as this when executing callbackFn.
🌍 Social Media Links.
◾ Facebook : / code.explained.official
◾ Twitter : / code_explained
◾ Instagram : / code.explained.official
◾ GitHub : github.com/CodeExplainedRepo
💲 Suppport the Channel
Paypal : paypal.me/CodeExplained
Buy Me a Coffee: www.buymeacoffee.com/CodeExpl...

Пікірлер: 7

  • @abahiduh3246
    @abahiduh3246 Жыл бұрын

    I have followed ur tutorial for more than a year....I am so excited that u are picking and explain the fundamentals; ur tutorial has the best Explanations with diagram, I will not cease sharing... Am suggesting that when teaching this fundamentals or concept, u could refer to any of your tutorials where u use such method or Js concept in real life project... example I saw where u use array in calculator tutorial to arrange buttons

  • @abahiduh3246

    @abahiduh3246

    Жыл бұрын

    Pls... make it a series...

  • @omarelsharookway1459
    @omarelsharookway1459 Жыл бұрын

    great clear and well explained tutorial. thank you

  • @CodeExplained

    @CodeExplained

    Жыл бұрын

    Glad it was helpful! thanks

  • @speedy-wk7fu
    @speedy-wk7fu Жыл бұрын

    Wonderful

  • @CodeExplained

    @CodeExplained

    Жыл бұрын

    Thank you! Cheers!

  • @MollickZ
    @MollickZ5 ай бұрын

    i hate javascript...........