Horje
sintaxis map javascript Code Example
sintaxis map javascript
var numbers = [1, 5, 10, 15];
var doubles = numbers.map(function(x) {
   return x * 2;
});
// doubles is now [2, 10, 20, 30]
// numbers is still [1, 5, 10, 15]

var numbers = [1, 4, 9];
var roots = numbers.map(function(num) {
    return Math.sqrt(num);
});
// roots is now [1, 2, 3]
// numbers is still [1, 4, 9]




Javascript

Related
whatsapp images not showing in meta tags Code Example whatsapp images not showing in meta tags Code Example
Error: spawnSync adb ENOENT at Object.spawnSync (node:internal/child_process:1083:20) Code Example Error: spawnSync adb ENOENT at Object.spawnSync (node:internal/child_process:1083:20) Code Example
how to add express in node js Code Example how to add express in node js Code Example
find the sum of an attribute in sequelize Code Example find the sum of an attribute in sequelize Code Example
Can i open native video playback for both (Androidt / IOS) With React Native? Code Example Can i open native video playback for both (Androidt / IOS) With React Native? Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7