in this video : difference between let and var when to use let in lwc when to use var in lwc Want to Connect with me one to one : topmate.io/salesforce_in_5_minutes
Hey in the 'let' example you are creating anothe variable inside the if block and printing its value. You are not changing the value of myVar declared outside if block.
Thanks...Though it looks simple many people don't know the difference I feel.
Yeah thats true and also asked in interviews as well 😄
can you please make sure if the video can have more clarity that will be great !
@@HelloitsmeReena clarity do u mean video clarity or concept clarity?
Hey in the 'let' example you are creating anothe variable inside the if block and printing its value. You are not changing the value of myVar declared outside if block.
I was just trying to prove a point that let are used for scope !