Home »
MCQs »
AngularJS MCQs
Consider the below statement – what will be the output (6)?
27. Consider the below statement – what will be the output?
<div ng-app="" ng-init="values=[10, 20, 30]">
<p>The value is {{values[0]}} + {{values[2]}}</p>
</div>
- The value is 10 + 30
- The value is 40
- The value is NaN
- The value is Undefined
Answer: A) The value is 10 + 30
Explanation:
The output will be "The value is 10 + 30". Here, the addition operation will not be performed it will just print.