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  阅读(89)  评论(0)    收藏  举报