angular.forEach

var values = {name: 'misko', gender: 'male'};
var log = [];
angular.forEach(values, function(value, key) {
  this.push(key + ': ' + value);
}, log);
expect(log).toEqual(['name: misko', 'gender: male']);

  

posted @ 2017-10-16 16:27  zhujhhxx  阅读(63)  评论(0编辑  收藏  举报