Message from JavaScript discussions

December 2017

— Check if it exists in your code I mean


Is there a more simple solution to this? Use case involves 2 functions, both accept any args (using rest operator) but one has to call the other func...

function someFunc(...args) {
// do something
function myFunc(...args) {
someFunc.apply(thisarg, args);

— I get I can use rest operator again instead of apply too, but apply actually is needed here

— Example real code:

FORK_CHILD: function (bg = false, ...args) {
const pid =, bg, ...args);
return pid;

Message permanent page

— That was one of my first thoughts but they're part of the prototype

— Kernel.prototype.sysCallProcedures

— This is a great post for new people in js

— Https://

Message permanent page

— I want the this var for Kernel.prototype.sysCallProcedures.ANYTHING to be set to the instance of Kernel

Message permanent page

— But because they're in the sysCallProcedures object, this is undefined unless I use apply or call


var test = function () {
this.thing = "Hello world";
test.prototype.stuff = {
testFunc: function () {
var testInstance = new test();
VM505:6 undefined

Message permanent page

— Example code