AngularJS Example:

by Brett DeWoody

HTML

<div ng-app>
  <div ng-controller="ctrl">
      <table>
            <tr>
                <td ng-repeat="f in foo">
                    <input ng-model="foo[$index]" style="width:60px" autofocus></input>
                </td>
            </tr>
      </table>
      {{foo[0]}}
      {{foo[1]}}
      {{foo[2]}}
      {{foo[3]}}
      {{foo[4]}}
  </div>
</div>

JavaScript

function ctrl($scope) {
  $scope.foo = [];
    for (var i=0; i<5; i++) {
        $scope.foo.push('');
    }  
}