Can't use “download” as a function name in javascript

前端 未结 2 410
攒了一身酷
攒了一身酷 2020-11-28 11:34

I\'ve had a problem with this little snippet:




        
2条回答
  •  一个人的身影
    2020-11-28 11:49

    Some function names are simply reserved or already used. Another would be "evaluate".

    I recommend prepending something to all of your function and variable names to avoid this kinds of situations. Example: "sto_download"

提交回复
热议问题