Methods

Inline Method

Example:

methods:
    someMethod(x): "
        return x*x;
    "

Method from File

Example:

method:
  otherMethod(x):
    code: $include(./some/code.js)
    entry: module.exports
// ./some/code.js

function otherMethod(x) {
  return x * x;
}

module.exports = otherMethod;

Contributing to the Documentation

Is something missing/incorrect? Please let us know by contacting support@kata.ai. If you know how to fix it straight away, don’t hesitate to create a pull request on this documentation’s GitHub repository.