Home > front end >  After the function can be used in parameter?
After the function can be used in parameter?

Time:11-26

Have an existing function, has been used in some places, I want to add a parameter in the funtion, do not know will not affect already in place?

CodePudding user response:

Rewriting is ok

CodePudding user response:

refer to the original poster singing sound Amadues response:
have an existing function, has been used in some places, I want to add a parameter in the funtion, do not know will not affect already in place?

If you add in the end, the most the most simple you just need to do processing of the parameter for into good, of course, if you are in front of the parameter is also optional parameters, the judgment more

CodePudding user response:

refer to the second floor bubble fish _ response:
Quote: refer to the original poster singing sound Amadues response:
have an existing function, has been used in some places, I'd like to add a parameter in the funtion, do not know will not affect already in place?

If you add in the end, the most the most simple you just need to do processing of the parameter for into good, of course, if the parameter is optional parameters in front of you, just the judgment more

Only need to add at the end of the parameters for processing, behind only refer to the function of the place will use this parameter, the used no matter before,
My question is if you added a parameter function here into the function (a, b), call the place is still a function (a), will have a problem,

CodePudding user response:

No problem, before the call just reads the parameter a, add parameters used after ok, as long as he doesn't pass b alone actually use {} is more convenient to expand function parameters, need to add fields on the attribute to add

CodePudding user response:

reference sound sound Amadues reply: 3/f
Quote: refer to the second floor bubble fish _ response:
Quote: refer to the original poster singing sound Amadues response:
have an existing function, has been used in some places, I'd like to add a parameter in the funtion, do not know will not affect already in place?

If you add in the end, the most the most simple you just need to do processing of the parameter for into good, of course, if the parameter is optional parameters in front of you, just the judgment more

Only need to add at the end of the parameters for processing, behind only refer to the function of the place will use this parameter, the used no matter before,
My question is if you added a parameter function here into the function (a, b), call the place is still a function (a), will have a problem,




references 4 floor jio can reply:
no problem, before the call just reads the parameter a, add parameters used after ok, as long as he doesn't pass b alone actually use {} is more convenient to expand function parameters, to do is add fields on the attribute to add

+ 1
  • Related