var variables are function-scoped, while let and const variables are block-scoped. This means that variables declared with var are accessible anywhere within the function in which they are declared, while variables declared with let and const are only accessible within the block in which they are declared.
Variables declared with let can be reassigned new values, while variables declared with const cannot be reassigned. Variables declared with var can also be reassigned.
var declarations are hoisted to the top of their scope, while let and const declarations are not hoisted. This means that you can use a var variable before it is declared, but you cannot do the same with a let or const variable.
In summary, let is used to declare variables that are block-scoped and can be reassigned, const is used to declare variables that are block-scoped and cannot be reassigned, and var is used to declare variables that are function-scoped and can be reassigned.