Can't figure out the functions?

  • 0
    Here is the function. Inside it, another function is called. how to pass results from return of a nested function to return of another?
    e.g.
    exec(){
    other();
    return [];
    }
    other(){
    return [cтрока,строка]
    }


    I sooooo want exec function to return string, string
    JavaScript Anonymous, Apr 15, 2020

  • 2 Answers
  • 0
    other() {
    return [cтрока, строка]
    }
    exec() {
    return other();
    }
    Anonymous

  • 0
    function exec() {
    return other();
    }

    function other() {
    return ["cтрока","строка"]
    }
    Arabella McKenzie

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!