どのようにあなたの機能を注文するのですか?


多くのプリンタでは、この関数の場合には関数bの底では関数aが宣言できないことになります.
function first(){
  second()
}

function second(){
  // Whatever
}

This rule will warn when it encounters a reference to an identifier that has not yet been declared.


エスペラントの支配:https://eslint.org/docs/rules/no-use-before-define
そこで、以下のように変更します.
function second(){
  // Whatever
}

function first(){
  second()
}
そして、私は私のプロジェクトでこの規則に従っていました.しかし、それが本当にそんなに重要であるならば、私は常に驚きます.JavaScriptは、正しい順序でない場合でも、関数宣言をうまく処理するようです.
そして真実は、我々は上から下への読書に使用されます.そして、これを行うには、もっと理解できます.
function first(){
  second()
  third()
}

function second(){
  fourth()
}

function third(){
  // Whatever
}

function fourth(){
  // Whatever
}
どのように、あなたは機能を分類しますか?これを聞きたいのですが.