so to conclude, it scans Function declarations first (but not func expressions and the arrow ones)…
Jihad Dzikri Waspada

Yes it just scans function declarations and not arrow functions or function expressions. Also, the variables belonging to the same scope as the function declaration are scanned, not the ones inside that function declaration. Let me know if you have any more doubts. Thanks for reading the article!