javascript return of recursive function [duplicate]

You have to return all the way up the stack:

func2.call(this, sWord);

should be:

return func2.call(this, sWord);

Leave a Comment