How does JavaScript Map Function work....
Here is an example
var numbers = [4, 9, 16, 25];
function myFunction() {
x = document.getElementById("demo")
x.innerHTML = numbers.map(Math.sqrt);
}
If I execute the above function as part of my Javascript it print
2,3,4,5
So what happened using map function I applied the Math.sqrt to every element of my numbers array.
Here is an example
var numbers = [4, 9, 16, 25];
function myFunction() {
x = document.getElementById("demo")
x.innerHTML = numbers.map(Math.sqrt);
}
If I execute the above function as part of my Javascript it print
2,3,4,5
So what happened using map function I applied the Math.sqrt to every element of my numbers array.
13 comments:
myTectra Placement Portal is a Web based portal brings Potentials Employers and myTectra Candidates on a common platform for placement assistance
I am really happy with your blog because your article is very unique and powerful for new reader.
Click here:
selenium training in chennai
selenium training in bangalore
selenium training in Pune
selenium training in pune
Selenium Online Training
I think you have a long story to share and i am glad after long time finally you cam and shared your experience.
Java training in Bangalore | Java training in Marathahalli | Java training in Bangalore | Java training in Btm layout
Java training in Bangalore | Java training in Marathahalli | Java training in Bangalore | Java training in Btm layout
Just stumbled across your blog and was instantly amazed with all the useful information that is on it. Great post, just what i was looking for and i am looking forward to reading your other posts soon!
Data Science Training in Chennai | Data Science Training institute in Chennai | Data Science course in anna nagar
Data Science course in chennai | Data Science Training institute in Chennai | Best Data Science Training in Chennai | Data science course in Bangalore | Data Science Training institute in Bangalore | Best Data Science Training in Bangalore
Data Science course in marathahalli | Data Science training in Bangalore | Data Science course in btm layout | Data Science training in Bangalore
Really very nice blog information for this one and more technical skills are improve,i like that kind of post.
Devops Training courses
Devops Training in Bangalore
Best Devops Training in pune
Devops interview questions and answers
You got an extremely helpful website I actually have been here reading for regarding an hour. I’m an initiate and your success is incredibly a lot of a concept on behalf of me.
python course in pune
python course in chennai
python course in Bangalore
Your very own commitment to getting the message throughout came to be rather powerful and have consistently enabled employees just like me to arrive at their desired goals.
angularjs interview questions and answers
angularjs Training in bangalore
angularjs Training in bangalore
angularjs Training in chennai
automation anywhere online Training
Very Nice Blog
Nice information thanks for sharing
reliaable residenza
Thanks for sharing such a valuable information sap institute in Hyderabad
Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.
Devops Training in bangalore
Digital Marketing Training in bangalore
Data Science Training in bangalore
Java Training in bangalore
Hi I want to talk about one site fantastic free slots there I spend all my free time there I spend all my free time and get a small income
become a new player in the casino good internet casino gambling I understood, I understood that on this site, luck will smile at me
Post a Comment