let is similar to var but let has scope. let is only accessible in the block level it is defined In the above example variable ‘a’ is defined inside If statement and so it’s not accessible outside the function. 5