Skip to Content
avatar image
Former Member

How to call a function inside a function in sapui5..??

I want to call a function inside a function and pass the value to the called function..?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Feb 10, 2017 at 04:11 PM

    In your controller:

    doSomething: function(){
    this.sayHello("John");
    },
    
    sayHello: function(sName){
    console.log("Hello " + sName);
    }
    Add comment
    10|10000 characters needed characters exceeded

  • Feb 10, 2017 at 05:48 PM

    I think you are referring to higher order functions, this is possible in UI5 as we are writing the code in javascript

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 09, 2017 at 02:46 PM

    it means closure call.

    function showName (firstName, lastName) {
var nameIntro = "Your name is "; // this inner function has access to the outer function's variables, including the parameterfunction makeFullName () {
 return nameIntro + firstName + " " + lastName;
 return makeFullName ();
showName ("Michael", "Jackson"); // Your
    Add comment
    10|10000 characters needed characters exceeded