Home »
MCQs »
KnockoutJS MCQs
Which of the following is the correct syntax to create an empty array?
25. Which of the following is the correct syntax to create an empty array?
- this.arrayName = ko.observableArray();
- arrayName = this.observableArray();
- KO.arrayName = this.observableArray();
Answer: A) this.arrayName = ko.observableArray();
Explanation:
this.arrayName = ko.observableArray(); is the correct syntax to create an empty array.