我用如下所示的布局编写了 JavaScript 代码:
function MyObject() {
this.doSomething(){
someSubRoutine();
}
function someSubRoutine(){
//Sub-routine code here
}
}
ReSharper 警告我
在声明之前使用函数“someSubRoutine”
确实在声明函数之前使用了该函数,但是 ReSharper 建议我在使用之前声明我的函数是否有实际原因?我认为由于 JavaScript 的提升能力,这不会是一个问题。我应该遵循这个建议还是继续忽略它?