The call() method calls a function with a given this value and arguments
provided individually.

The call() method calls a function with a given this value and arguments
provided individually.

You can assign a different this object when calling an existing function.
this refers to the current object, the calling object. With call, you
can write a method once and then inherit it in another object, without
having to rewrite the method for the new object.

apply is very similar to call(), except for the type of arguments it supports.
You can use an arguments array instead of a named set of parameters. With
apply, you can use an array literal, for example,

fun.apply(this, ['eat', 'bananas'])

or an Array object, for example,

fun.apply(this, new Array('eat', 'bananas')).

MDN

Scala.js-specific note: call() can be used instead of the apply() method
available in JavaScript. Simply use the :_* notation to expand a Seq as
variadic arguments, e.g.,

vallength: Int

length is a property of a function object, and indicates how many arguments
the function expects, i.e.

length is a property of a function object, and indicates how many arguments
the function expects, i.e. the number of formal parameters. This number
does not include the rest parameter. By contrast, arguments.length is local
to a function and provides the number of arguments actually passed to the
function.

final defnotify(): Unit

final defnotifyAll(): Unit

Tests whether the specified property in an object can be enumerated by a
call to js.Object.properties, with the exception of properties
inherited through the prototype chain.

Tests whether the specified property in an object can be enumerated by a
call to js.Object.properties, with the exception of properties
inherited through the prototype chain. If the object does not have the
specified property, this method returns false.