Questions tagged «map-function»

30
වස්තු සඳහා සිතියම් ක්‍රියාකාරිත්වය (අරා වෙනුවට)
මට වස්තුවක් ඇත: myObject = { 'a': 1, 'b': 2, 'c': 3 } මම ස්වදේශීය ක්‍රමයක් සොයමි, ඒ හා සමාන Array.prototype.mapපහත පරිදි භාවිතා වේ: newObject = myObject.map(function (value, label) { return value * value; }); // newObject is now { 'a': 1, 'b': 4, 'c': 9 } ජාවාස්ක්‍රිප්ට් mapවස්තු සඳහා …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.