×

Multiple-Choice Questions

Web Technologies MCQs

Computer Science Subjects MCQs

Databases MCQs

Programming MCQs

Testing Software MCQs

Digital Marketing Subjects MCQs

Cloud Computing Softwares MCQs

AI/ML Subjects MCQs

Engineering Subjects MCQs

Office Related Programs MCQs

Management MCQs

More

KnockoutJS Multiple-Choice Questions (MCQs)

Knockout is a standalone JavaScript implementation of the Model–View–ViewModel pattern with templates.

KnockoutJS MCQs: This section contains multiple-choice questions and answers on the various topics of KnockoutJS. Practice these MCQs to test and enhance your skills on KnockoutJS.

List of KnockoutJS MCQs

1. KnockoutJS library is written in which language?

  1. Python
  2. Java
  3. JavaScript
  4. C
  5. C++

Answer: C) JavaScript

Explanation:

KnockoutJS library is written in JavaScript.

Discuss this Question


2. KnockoutJS was developed by ____?

  1. Håkon Wium
  2. Tim Berners-Lee
  3. Brendan Eich
  4. Steve Sanderson

Answer: D) Steve Sanderson

Explanation:

KnockoutJS library was developed by Steve Sanderson.

Discuss this Question


3. KnockoutJS is based upon which pattern?

  1. MVVM
  2. MVC
  3. MVCM

Answer: A) MVVM

Explanation:

KnockoutJS library is based upon Model -View-ViewModel.

Discuss this Question


4. Does KnockoutJS supports responsive development?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

KnockoutJS library creates a website that is responsive.

Discuss this Question


5. Does KnockoutJS depends on any other framework?

  1. Yes
  2. No

Answer: B) No

Explanation:

KnockoutJS library is independent of any other framework.

Discuss this Question


6. Is KnockoutJS open source?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

KnockoutJS library is an open-source library.

Discuss this Question


7. In the MVVM pattern the data which is stored in the application comes under which component?

  1. Model
  2. View
  3. ViewModel

Answer: A) Model

Explanation:

In the MVVM pattern the data which is stored in the application comes under the Model component.

Discuss this Question


8. In the MVVM pattern, the user interface part of the application comes under which component?

  1. Model
  2. View
  3. ViewModel

Answer: B) View

Explanation:

In the MVVM pattern, the user interfaces part of the application comes under the View component.

Discuss this Question


9. Which of the following abbreviation is used for KnockoutJS?

  1. KJS
  2. KO.JS
  3. KO

Answer: C) OK

Explanation:

KO is the abbreviation that we used for KnockoutJS.

Discuss this Question


10. Does KO support all the mainstream browsers?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, KO supports all the mainstream browsers: Firefox 3.5+, Chrome, Opera, and Safari (desktop/mobile).

Discuss this Question


11. Does KO support the automatic UI refresh feature?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, KO supports an automatic UI refresh feature.

Discuss this Question


12. In the code given below, string refers to which type of variable
this.String = ko.observable("Enter String");?

  1. Model
  2. View
  3. ViewModel

Answer: C) ViewModel

Explanation:

String refers to the ViewModel variable.

Discuss this Question


13. ____ is a notion that monitors value changes in order to update the underlying ViewModel data.

  1. KO.this
  2. KO.observable
  3. KO.write
  4. KO.observe

Answer: B) KO.observable

Explanation:

KO.observable is a notion that monitors value changes in order to update the underlying ViewModel data.

Discuss this Question


14. KnockoutJS is widely used for ____

  1. Full stack-based application
  2. Multiple-page application
  3. Single-page application
  4. None

Answer: C) Single-page application

Explanation:

KnockoutJS is widely used for Single Page Applications.

Discuss this Question


15. KnockoutJS is a ____

  1. Client-server side framework
  2. Client-side framework
  3. Server-side framework

Answer: B) Client-side framework

Explanation:

KnockoutJS is a client-side framework.

Discuss this Question


16. In KnockoutJS, Because of the ____ attribute, all data remains synchronized.

  1. Observable
  2. This
  3. Data bind

Answer: A) Observable

Explanation:

In KnockoutJS because of the Observable attribute, all data remains synchronized.

Discuss this Question


17. ____ is just a user interface built using HTML components and CSS style.

  1. ViewModel
  2. Model
  3. View

Answer: C) View

Explanation:

View is just a user interface built using HTML components and CSS style.

Discuss this Question


18. ____ is a JavaScript object that provides the attributes and methods required to represent data.

  1. ViewModel
  2. Model
  3. View

Answer: A) ViewModel

Explanation:

ViewModel is a JavaScript object that provides the attributes and methods required to represent data.

Discuss this Question


19. ____ is the domain data on the server, and it is modified when the ViewModel request is sent/received.

  1. ViewModel
  2. Model
  3. View

Answer: B) Model

Explanation:

The model is the domain data on the server, and it is modified when the ViewModel request is sent/received.

Discuss this Question


20. Who developed MVVM pattern?

  1. Tim Berners-Lee
  2. Trygve Reenskaug
  3. John Gossman

Answer: C) John Gossman

Explanation:

John Gossman developed the MVVM pattern.

Discuss this Question


21. In which year MVVM pattern came into existence?

  1. 2001
  2. 2005
  3. 2008
  4. 2009

Answer: B) 2005

Explanation:

MVVM pattern came into existence in the year 2005.

Discuss this Question


22. Which pattern is better MVC or MVVM?

  1. MVC
  2. MVVM

Answer: B) MVVM

Explanation:

MVVM pattern is quite better than the MVM pattern, due to its one-way data and dependency flow.

Discuss this Question


23. ____ connects DOM components to ViewModel.

  1. Observable
  2. This
  3. Data bind

Answer: C) Data bind

Explanation:

'Data-bind' connects DOM components to ViewModel.

Discuss this Question


24. Which of the following is the correct syntax to use observable attributes in KO?

  1. Observable = ko.this ('value');
  2. this.property = ko.observable('value');
  3. this.observable = ko.this('value');

Answer: B) this.property = ko.observable('value');

Explanation:

this.property = ko.observable('value'); is the correct syntax to use observable attribute in KO.

Discuss this Question


25. Which of the following is the correct syntax to create an empty array?

  1. this.arrayName = ko.observableArray();
  2. arrayName = this.observableArray();
  3. KO.arrayName = this.observableArray();

Answer: A) this.arrayName = ko.observableArray();

Explanation:

this.arrayName = ko.observableArray(); is the correct syntax to create an empty array.

Discuss this Question


26. Which of the following method is used to add a new item to the end of the array?

  1. Add()
  2. Insert()
  3. Push()
  4. Add_end()

Answer: C) Push()

Explanation:

The push() method is used to add a new item to the end of the array.

Discuss this Question


27. Which of the following method is used to add a new value to the array's beginning?

  1. Shift()
  2. Insert()
  3. Add()
  4. Unshift()

Answer: D) Unshift()

Explanation:

Unshift() method is used to add a new value to the array's beginning.

Discuss this Question


28. Which of the following method is used to eliminate the last item from the arrays and returns it?

  1. Del()
  2. Pop()
  3. Delete()
  4. Remove()

Answer: B) Pop()

Explanation:

The pop() method is used to eliminate the last item from the arrays and returns it.

Discuss this Question


29. Which of the following method is used to remove and returns the first item from the array?

  1. Shift()
  2. Unshift()
  3. ShiftF()
  4. First()

Answer: A) Shift()

Explanation:

The shift() method is used to remove and returns the first item from the array.

Discuss this Question


30. Which of the following method returns the index of the first occurrence of the specified argument?

  1. Index()
  2. First()
  3. Element()
  4. IndexOf()

Answer: D) IndexOf()

Explanation:

IndexOf method returns the index of the first occurrence of the specified argument.

Discuss this Question


31. Which of the following method removes all items and returns an array of them?

  1. Pop()
  2. Remove()
  3. Delete
  4. RemoveAll()

Answer: B) Remove()

Explanation:

Remove method removes all items and returns an array of them.

Discuss this Question


32. Is the Remove() method and Pop() method the same?

  1. Yes
  2. No

Answer: B) NO

Explanation:

No, they are not the same. The remove() method removes all items and returns an array of them, whereas the Pop() method is used to eliminate the last item from the arrays and return it.

Discuss this Question


33. A ____is a function that is reliant on one or more observables and that automatically updates when those underlying observables (dependencies) change?

  1. Computed observable
  2. Observable
  3. Marked Observable

Answer: A) Computed observable

Explanation:

A computed observable is a function that is reliant on one or more observables and that automatically updates when those underlying observables (dependencies) change.

Discuss this Question


34. If the property is Computed Observable, which of the following method returns true?

  1. Ko.isobservable
  2. ko.isComputed
  3. ko.Computedis

Answer: B) ko.isComputed

Explanation:

ko.isComputed returns true, If the property is Computed Observable.

Discuss this Question


35. Which of the following method, returns true if the property is Observable?

  1. ko.isObservable
  2. ko.isComputed
  3. ko.Computedis

Answer: A) ko.isObservable

Explanation:

ko.isObservable method, returns true if the property is Observable.

Discuss this Question


36. Computed Observable is ____

  1. Read and write only
  2. Write only
  3. Read only

Answer: C) Read only

Explanation:

Computed Observable is Read-only.

Discuss this Question


37. Is observable and bindings the same thing?

  1. Yes
  2. No

Answer: B) NO

Explanation:

No, they are not the same.

Discuss this Question


38. Binding in KO consists of how many items?

  1. 3
  2. 4
  3. 2
  4. 5

Answer: C) 2

Explanation:

The binding consists of 2 items, the binding name, and value.

Discuss this Question


39. The binding value can be a ____

  1. Single value
  2. Literal,
  3. A variable
  4. JavaScript expression.
  5. All of the above

Answer: E) All of the above

Explanation:

The binding value can be a single value, a literal, a variable, or can be a JavaScript expression.

Discuss this Question


40. An object might relate to the data utilized in the current bindings. This object is referred to as the ____

  1. Declarative binding
  2. View binding
  3. Binding context

Answer: C) Binding context

Explanation:

An object might relate to the data utilized in the current bindings. This object is referred to as the binding context.

Discuss this Question


41. Which of the following binding context type, is always the top-level ViewModel?

  1. $root
  2. $data
  3. $index
  4. $parent

Answer: A) $root

Explanation:

$root binding context type, is always the top-level ViewModel.

Discuss this Question


42. In the current condition, which of the following binding context type, contains raw ViewModel value?

  1. $data
  2. $index
  3. $parent
  4. $rawdata
  5. $raw

Answer: D) $rawdata

Explanation:

In the current condition, $rawdata context contains raw ViewModel value.

Discuss this Question


43. When the values are modified, KnockoutJs automatically records the dependencies. It just has one object named ____

  1. Tracker
  2. Dependent tracker
  3. Dependency tracker
  4. None
  5. All of the above

Answer: C) Dependency tracker

Explanation:

When the values are modified, KnockoutJs automatically records the dependencies. It just has one object named dependency tracker.

Discuss this Question


44. Using the ____ function, you may access the Computed Observable without incurring a dependence.

  1. Peak
  2. Tracker
  3. Peek
  4. This

Answer: C) Peek

Explanation:

Using the peek function, you may access the Computed Observable without incurring a dependence.

Discuss this Question


45. The ____method allows you to ignore dependencies in the calculated dependencies that you do not wish to track.

  1. ko.ignore
  2. ko.ignoreDependencies
  3. ko.Dependencies
  4. ko.ignoreDependeny

Answer: B) ko.ignoreDependencies

Explanation:

The ko.ignoreDependencies method allows you to ignore dependencies in the calculated dependencies that you do not wish to track.

Discuss this Question


46. A ____ is a collection of DOM components that may be used repeatedly.

  1. Template
  2. Component
  3. Module
  4. Unit

Answer: A) Template

Explanation:

A template is a collection of DOM components that may be used repeatedly.

Discuss this Question


47. In how many ways you can create templates in KnockoutJS?

  1. 4
  2. 5
  3. 3
  4. 2

Answer: D) 2

Explanation:

There are 2 ways of creating templates: Native templating, and String-based templating

Discuss this Question


48. Which of the following method of creating a template supports the control flow bindings such as foreach, with, and if?

  1. Native templating
  2. String-based templating

Answer: A) Native templating

Explanation:

Native templating of creating template supports the control flow bindings such as foreach, with, and if.

Discuss this Question


49. In which of the following method of creating a template no external library is required?

  1. Native templating
  2. String-based templating

Answer: A) Native templating

Explanation:

Native templating does not require any external library.

Discuss this Question


50. Components can register using the ____ API

  1. ko.components.register()
  2. ko.components.observable()
  3. ko.register()

Answer: A) ko.components.register()

Explanation:

Components can register using the ko.components.register() API.

Discuss this Question


51. Which of the following method, generates a new view Each component has its own model object?

  1. Observable function
  2. Constructor function
  3. Shared object instance

Answer: B) Constructor function

Explanation:

The constructor function generates a new view Each component has its own model object.

Discuss this Question


52. Custom element is a way to rendering a component?

  1. Element
  2. Constructor
  3. Component
  4. Custom element

Answer: D) Custom element

Explanation:

A custom element is a way for rendering a component.

Discuss this Question


53. Which of the following method is used to remove the component from the registry?

  1. ko.components.eliminate(name)
  2. ko.components.unregister(name)
  3. ko.components.remove(name)

Answer: B) ko.components.unregister(name)

Explanation:

ko.components.unregister(name), is used to remove the component from the registry.

Discuss this Question


54. Which of the following type of templating, links to a third-party engine to send information ViewModel parameters?

  1. Native templating
  2. String-based templating
  3. All of the above

Answer: B) String-based templating

Explanation:

String-based templating links to a third-party engine to send information ViewModel parameters.

Discuss this Question


55. How many types of data binding does KnockoutJS supports?

  1. 5
  2. 4
  3. 2
  4. 3

Answer: C) 2

Explanation:

Knockout JS supports two types of data binding:

  • One-way binding
  • Two-way binding

Discuss this Question


56. How many context properties are there in KnockoutJS?

  1. 5
  2. 4
  3. 2
  4. 3

Answer: C) 2

Explanation:

There are two context properties:

  • $index, and
  • $parent property

Discuss this Question


57. Which of the following are the alternatives of KnockoutJS?

  1. Angular.
  2. Chart.Js.
  3. angularjs.
  4. Backbone.js.
  5. All of the above

Answer: E) All of the above

Explanation:

Following are the alternatives of KnockoutJS:

  • Angular.
  • Chart.Js.
  • angularjs.
  • Backbone.js.

Discuss this Question


58. Which of the following companies used KnockoutJS?

  1. AMC Theatres
  2. Azure
  3. Dominos.jp
  4. Pillsbury.com
  5. All of the above

Answer: E) All of the above

Explanation:

Following are the companies that use KnockoutJS:

  • AMC Theatres
  • Azure
  • Dominos.jp
  • Pillsbury.com

Discuss this Question




Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.