let letter=[{ sLetter:'a', sNumber:0, bletter:'A', bNumber:0 },{ sLetter:'b', sNumber:0, bletter:'B', bNumber:0 },{ sLetter:'c', sNumber:0, bletter:'C', bNumber:0 },{ sLetter:'d', sNumber:0, bletter:'D', bNumber:0 },{ sLetter:'y', sNumber:0, bletter:'Y', bNumber:0 },{ sLetter:'z', sNumber:0, bletter:'Z', bNumber:0 }] letter.forEach(function(item){ item.sNumber=item.sLetter.charCodeAt(); item.bNumber=item.bletter.charCodeAt(); }); console.log(letter);