Knockout Online Skills Assessment Test

Topics covered

Data Binding Syntax, Creating a View Model, ViewModels with Parameters, Event Data Bindings, Extending Observables, Binding Knockout Template, Showing and Hiding Elements

  • MAQ (Multiple Answer Question)
  • MCQ (Multiple Choice Question)
  • Descriptive Question
  • White Board Simulator
  • Coding Simulator
  • Audio Question
  • Video Question
  • Case Study Question

Knockout Test helps Hiring Managers & Recruiting Teams to validate the KnockoutJS coding skills of Knockout JS Developer. Knockout.JS is a language which is written under Javascript and helps to develop rich and responsive website. Knockout JS is independent of any other framework and provides easy way to handle complex data-driven interfaces. It gives easy templates to create high level UI structures and also gives easy custom. Knockout.JS online test is specially designed to check application, practical skills of an KnockoutJS developer – as per Industry Standards.
 
Knockout.JS assessment test contains questions on following Topics:
 

  • Data Binding Syntax

  • Creating a View Model

  • ViewModels with Parameters

  • Event Data Bindings

  • Extending Observables

  • Binding Knockout Template

  • Showing and Hiding Elements  


Knockout JS skills test is designed by our subject matter experts to evaluate knowledge of Knockout JS developer before hiring. Using powerful reporting, you can have a detailed analysis of the test results to help you make a better hiring decision and predict the candidate’s performance.

The test contains MCQ's (Multiple Choice Questions), MAQ's (Multiple Answer Questions), Fill in the Blank, Descriptive, True or False.

This pre-employment test is useful for hiring:
  • KnockoutJS Developer (0-3 years experience)
  • UI Developer - KnockoutJS 
  • Javascript Developer - KnockoutJS

Test details:

This Knockout JS interview test enables employers and recruiters to identify & hire right fit Knockout.JS Developer by evaluating working skills and job readiness. For this reason, the emphasis is laid upon evaluating the knowledge of applied skills gained through real work experience, rather than theoretical knowledge. 

Test Duration: 20 minutes 

15 Application Oriented Questions

05 Theory Questions 


The combination on Application and Theory questions helps to evaluate Technical as well as practical Skills of Candidates

Knockout JS Test

Question #1 of 3

You need to provide binding true / false to radio buttons in Knockout JS. Which of the following codes will work?
  
 

Note: There can be multiple correct answers to this question.

    • <label>Male
      <input type="radio" name="IsMale" value="1" data-bind="checked:IsMale"/>
      </label>
      <label>Female
      <input type="radio" name="IsMale" value="0" data-bind="checked:IsMale"/>
      </label>
      <div data-bind="text: !!+IsMale()"/>
      var vm = {
      IsMale: ko.observable(false)
      };
      ko.applyBindings(vm);

    • var ViewModel = function() {
      this.IsMale = ko.observable(true);
      this.IsMale.ForEditing = ko.computed({
      read: function() {
      return this.IsMale().toString();
      },
      write: function(newValue) {
      this.IsMale(newValue === "true");
      },
      owner: this
      });
      };

    • <label>Male
      <input type="radio" name="IsMale" value="true" data-bind="checked:IsMale"/>
      </label>
      <label>Female
      <input type="radio" name="IsMale" value="false" data-bind="checked:IsMale"/>
      </label>

    • <label>Male
      <input type="radio" name="IsMale" value="true" data-bind="checked:IsMale()"/>
      </label>
      <label>Female
      <input type="radio" name="IsMale" value="false" data-bind="checked:IsMale()"/>
      </label>

Question #2 of 3

Person {
 int Id;
 string Name;
 Book[] Books;
 }
 Book {
 int Id;
 string Name;
 }
 function viewModel() {
 var self = this;
 self.persons = ko.observableArray();
 // persons are retrieved via AJAX...
 ko.mapping.fromJS(persons, {}, self.persons);
 }
 jQuery(function( $ ) {
 ko.applyBindings(new viewModel());
 });

How can you extend persons observableArray to set validation rules and message?

Note: There can be multiple correct answers to this question.

    • Use the mapping options to attach the validation rules when certain properties are created.
      <input data-bind="value: name" />
      var data = { name: "Joe Shmo" };
      var validationMapping = {
      // customize the creation of the name property so that it provides validation
      name: {
      create: function(options) {
      return ko.observable(options.data).extend( {required: true} );
      }
      }
      };
      var viewModel = ko.validatedObservable(ko.mapping.fromJS(data, validationMapping)); ko.applyBindings(viewModel);

    • Use HTML5 attributes. This is only supported for some validations (i.e. required, pattern).
      <input data-bind="value: name" required />
      ko.validation.configure({
      parseInputAttributes: true
      });
      var data = { name: "Joe Shmo" };
      var viewModel = ko.validatedObservable(ko.mapping.fromJS(data));
      ko.applyBindings(viewModel);

    • function viewModel() {
      var self = this;
      self.persons = ko.observableArray();
      // persons are retrieved via AJAX...
      ko.mapping.fromJS(persons, {}, self.persons);
      self.Name.extend({ required: true });
      }

    • function viewModel() {

      var self = this;
      self.persons = ko.observableArray();
      // persons are retrieved via AJAX...
      ko.mapping.fromJS(persons, {}, self.persons);
      self.Name.extend({ required: false });
      }

Question #3 of 3

In your app you need to show validation messages for user, which of the following ways is correct for this?

Note: There can be multiple correct answers to this question.

    • Set ko.validation.configure to use deep grouping because the default value is false.
      and implement logic validation in viewmodel. for example
      viewmodel.save = function(){
      var result = ko.validation.group(viewModel, {deep: true});
      if (!viewModel.isValid())
      {
      alert("Please fix all errors before preceding");
      result.showAllMessages(true);
      return false;
      }}

    • Set ko.validation.configure to use deep grouping because the default value is false.
      and implement logic validation in viewmodel. for example
      viewmodel.save = function(){
      var result = ko.validation.group(viewModel, {deep: true});
      if (result().length > 0)
      {
      alert("Please fix all errors before preceding");
      result.showAllMessages(true);
      return false;
      }}

    • Use jquery validate plugin for it.

    • Implement viewModel.errors.showAllMessages() function to viewModel;

Candidate Name
Assessment Name
Invited by
Assessment Date
IP Address
Status
















24.00 Out of 40.00
Pass
60%
03
23 Minutes

Java EE

9/10

Hibernate

3/10

Oracle PL/SQL

7/10

Analytical Thinking

5/10

Note:If score<= 30% then its a Weakness. If score >=70% then its a Strength.

Strengths

Java EE, Oracle PL/SQL, Analytical Thinking

Weaknesses

Hibernate

Happy

It was a good test for me, the questions were on the latest technology of java on which I am currently working. It was a great experience. Thank you!

Sign up for a free trial today

Get your free trial and test up to 10 candidates. No strings attached. No credit card required.

SIGN UP FOR FREE

Schedule a Demo

How Interview Mocha works?

  • Add this test to your account

  • Invite candidates to take this test online

  • Candidates take the test

  • View and share actionable test reports

Trusted by leading brands worldwide

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • hexaware
Why hiring managers and recruiters across the globe love Interview Mocha
  • Largest number of ready pre-employment skill tests
  • Relevant test compositions and quality questions designed by Subject Matter Experts (IM SME)
  • Fastest custom test creation DNA
  • World’s most super easy skill assessment platform
  • High level of platform security implementation
  • Friendly and quick customer support
  • Ready to listen and implement your feedback, we are all ears
  • Affordable pricing

Sign up for a free trial today

Get your free trial and test up to 10 candidates. No strings attached. No credit card required.

SIGN UP FOR FREE

Schedule a Demo