Map in JS
Map in JS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>map in JS</title>
</head>
<body>
<script>
var a = [10,20,30,40,50];
console.log(a);
var b = a.map(test);
console.log(b);
function test(i)
{
return i*10;
}
</script>
</body>
</html>
Comments
Post a Comment
I WOULD APPRECIATE IF YOU LEAVE A COMMENT OR YOUR FEEDBACK HERE !!!