Ad
  • Custom User Avatar

    let is identical to var.
    The only difference is,
    var is scoped to the 'nearest function block' and let is scoped to the 'nearest enclosing block'
    for eg. let is only visible in the for() loop and var is visible to the whole function.