You have to return all the way up the stack:
func2.call(this, sWord);
should be:
return func2.call(this, sWord);
More Related Contents:
- Recursive function returns undefined
- Return value of recursive function is ‘undefined’
- How to write recursive function javascript push my array property Json object?
- Does return stop a loop?
- How do I replace while loops with a functional programming alternative without tail call optimization?
- Recursion in Angular directives
- How does Asynchronous Javascript Execution happen? and when not to use return statement?
- Search recursively for value in object by property name
- Calling a javascript function recursively
- Are functions in JavaScript tail-call optimized?
- Why does a module level return statement work in Node.js?
- javascript: recursive anonymous function?
- How to make chainable function in JavaScript?
- Maximum call stack size exceeded on SetTimeout recursive function (Javascript) [duplicate]
- How to check the depth of an object?
- Using JavaScript what’s the quickest way to recursively remove properties and values from an object?
- Understanding Event Queue and Call stack in javascript
- Get return value from setTimeout [duplicate]
- return !1 in javascript
- Recursive depth function on an array
- Why does this recursive function return undefined?
- recursive function vs setInterval vs setTimeout javascript
- Finding all permutations of array elements as concatenated strings
- Javascript recursion from Eloquent Javascript
- Javascript – deepEqual Comparison
- How to find the least common multiple of a range of numbers?
- how to render child components in react.js recursively
- Will a recursive ‘setTimeout’ function call eventually kill the JS Engine?
- Recursive tree search in a nested object structure in JavaScript
- Renaming object keys recursively