Hi Sheng,

Could you please share the link where you found that para? I couldn't find it myself.

But here's my opinion on this:

IMO both are similar. The only difference I can think of is :

- Function declaration save the VariableEnvironment component as their [[Scope]] property, and Function expressions save LexicalEnvironment.

If you want to understand more about it please refer this link by Dr. Axel

https://2ality.com/2011/04/ecmascript-5-spec-lexicalenvironment.html

Amandeep Singh
Amandeep Singh

Written by Amandeep Singh

Developer @ Domain Sydney. Tech enthusiast and a pragmatic programmer. If coding is hard, you are not doing it right.

No responses yet