Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: userc865b
Added: Oct 16, 2018 2:08 PM
Views: 5
Tags: js
  1. var numbers = [4, 9, 16, 25];
  2.  
  3. function myFunction() {
  4.     x = document.getElementById("demo")
  5.     x.innerHTML = numbers.map(Math.sqrt);
  6. }  =>2, 3, 4, 25