i have script programmer giving list html. how can give single values , add them html?
$scope.getresult = function() { $scope.result = []; papfields.foreach( function( field ) { var name = field[ field.length - 1 ]; $scope.result.push( [ field[ 0 ], name, +window[ name ] ] ); } ); };
please use for() instead of foreach
$scope.getresult = function() { $scope.result = []; for(var = 0; < papfields.length; i++){ var name = papfields[i][ field.length - 1 ]; $scope.result.push( [ papfields[i][ 0 ], name, +window[ name ] ] ); } };
Comments
Post a Comment