Home »
MCQs »
AngularJS MCQs
Consider the below statement – what will be the output (4)?
25. Consider the below statement – what will be the output?
<div ng-app="" ng-init="cities=['Mumbai','New Delhi','Banglore']">
<p>The cities...</p>
<ul>
<li ng-repeat="c in cities">
"Hello" {{ c }}
</li>
</ul>
</div>
- Prints the city names with "Hello" in an unordered list
- Prints the city names with "Hello" in an ordered list
- Prints the all name of the city with "Hello" 3 times in an unordered list
- None of the above
Answer: A) Prints the city names with "Hello" in an unordered list
Explanation:
The output will be:
The cities...
- "Hello" Mumbai
- "Hello" New Delhi
- "Hello" Banglore