문제

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 ?

도움이 되었습니까?

해결책

Use this, it should work.

saveTeacher: function(e) {
  this.md5(str);
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top