Thank you for your post, I am a newbie to Nodejs and quite confusing on when to use let, const or var. As I saw some require a module with var while some with const, could you advise which is better when requiring a module? After reading your post, I think const is better to require another module because it will never change.
One more question could you please do me a favor to explain the memory usage between these three, is there any different other than scope, thank you
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you for your post, I am a newbie to Nodejs and quite confusing on when to use
let
,const
orvar
. As I saw some require a module withvar
while some withconst
, could you advise which is better when requiring a module? After reading your post, I thinkconst
is better to require another module because it will never change.One more question could you please do me a favor to explain the memory usage between these three, is there any different other than
scope
, thank you