<!DOCTYPE html> <html> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script> <body> <div ng-app="" ng-init="points=[20,120,123,22]"> <p>The third result is {{ points[0] }}</p> </div> </body> </html>
Output:
The third result is 20
AngularJS arrays with example
Working Code Asked question September 21, 2023