Question

I have a function, which I would I like to call and pass a variable from another function. The function being called then returns a variable. I am unsure as to how to complete this task. I have attempted a varying number of ways but none with any success. Here is the sample code:

  md5: function  ( str ) {

 return String

}

I want to call this md5 function from inside this function:

saveTeacher: function(e) {

}

How would I achieve this ?

Was it helpful?

Solution

Use this, it should work.

saveTeacher: function(e) {
  this.md5(str);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top