Skip to Content
0

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

Feb 10, 2017 at 10:55 AM

714

avatar image
Former Member

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

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

In your controller:

doSomething: function(){
this.sayHello("John");
},

sayHello: function(sName){
console.log("Hello " + sName);
}
Share
10 |10000 characters needed characters left characters exceeded
Srikanth KV Feb 10, 2017 at 05:48 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
A K Jun 09, 2017 at 02:46 PM
0

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
Share
10 |10000 characters needed characters left characters exceeded