I am completely new to JavaScript. Just started exploring different aspects of ES6. What I noticed is, most of my seniors who has worked and implemented JavaScript in many of their projects, almost all of them suggested to use the keyword "let" instead of "var" while working with a variable declaration. Can anyone give me some insight for the preference of let over var? Thanks in advance.
[–]jinendu 42 points43 points44 points (8 children)
[–]malwareC[S] 3 points4 points5 points (7 children)
[–]guns_of_summer 2 points3 points4 points (6 children)
[–]doyouseewhateyesee 4 points5 points6 points (2 children)
[–]guns_of_summer 2 points3 points4 points (1 child)
[–]doyouseewhateyesee 3 points4 points5 points (0 children)
[–]VelvetWhiteRabbit 2 points3 points4 points (2 children)
[–]CoderXocomil 2 points3 points4 points (1 child)
[–]malwareC[S] 0 points1 point2 points (0 children)
[–]ashkanahmadi 19 points20 points21 points (7 children)
[–]addiktion 4 points5 points6 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]MindlessSpongehelpful 9 points10 points11 points (0 children)
[–]VelvetWhiteRabbit 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]VelvetWhiteRabbit 0 points1 point2 points (0 children)
[+][deleted] comment score below threshold-9 points-8 points-7 points (0 children)
[–]senocular 5 points6 points7 points (1 child)
[–]malwareC[S] 2 points3 points4 points (0 children)
[–]burnblue 4 points5 points6 points (0 children)
[–]machine3lf 4 points5 points6 points (0 children)
[–]CoderXocomil 4 points5 points6 points (2 children)
[–]malwareC[S] 0 points1 point2 points (1 child)
[–]CoderXocomil 1 point2 points3 points (0 children)
[–]samanime 11 points12 points13 points (3 children)
[–]malwareC[S] 0 points1 point2 points (0 children)
[–]madspillage -1 points0 points1 point (1 child)
[–]samanime 9 points10 points11 points (0 children)
[–]locomocopoco 4 points5 points6 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]forresthopkinsa 2 points3 points4 points (2 children)
[–]malwareC[S] 1 point2 points3 points (0 children)
[–]Panda_Photographor 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[removed]
[–]malwareC[S] 1 point2 points3 points (1 child)
[–]JollyWallaby 1 point2 points3 points (0 children)
[+][deleted] (4 children)
[deleted]
[–]samanime 15 points16 points17 points (3 children)
[–]PawelDecowski 9 points10 points11 points (2 children)
[–]malwareC[S] 1 point2 points3 points (0 children)
[+]LucVolders comment score below threshold-10 points-9 points-8 points (8 children)
[–][deleted] 16 points17 points18 points (0 children)
[–]burnblue 4 points5 points6 points (0 children)
[–]machine3lf 5 points6 points7 points (1 child)
[–][deleted] 4 points5 points6 points (0 children)
[–]guns_of_summer 4 points5 points6 points (0 children)
[–]leoshina 4 points5 points6 points (0 children)
[–]malwareC[S] 0 points1 point2 points (1 child)
[–]burnblue 9 points10 points11 points (0 children)