For example, I working with a framework that would invoke a custom function like this:
var ret = Module_Init(index, clk, obj);
The function Module_Init
should be defined by user. And in my Module_Init
, I only need the first parameter index
. So I define it like this:
function Module_Init(index)
{
m_Index = index;
// initialize code...
}
It work, but is it a good practice in Javascript?
If you are not going to use them, why put them in the function
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.