question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider using let instead of var

See original GitHub issue

Just a query, shouldn’t we consider migrating over to let instead of var for some JS like this:

https://getbootstrap.com/docs/4.1/getting-started/browsers-devices/#select-menu

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
Johann-Scommented, Oct 10, 2018

According to Can I Use see: https://caniuse.com/#feat=let We cannot use let in IE 10, and we’re still compatible with IE 10 so it’ll give a wrong direction for our users.

But in a next major release we should change that for sure 👍

0reactions
Johann-Scommented, May 1, 2019

@SuperPat45 we won’t support IE 10 in v5 only IE 11

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use 'let' and 'const' instead of 'var' - Evert Pot
var uses something called 'hoisting', which can lead to unexpected results. · let and const are both block-scoped. Which means you can declare ......
Read more >
let - JavaScript - MDN Web Docs
let allows you to declare variables that are limited to the scope of a block statement, or expression on which it is used,...
Read more >
Should I use let or var when implementing a singleton?
There is no difference between let or var, when we are talking about singleton implementation. I have already checked it in my IDE....
Read more >
Const vs Let vs Var in Javascript. Which One Should You Use?
The main difference between the two though is that let deals with block scope whereas var deals with global scope or function scope...
Read more >
When should I use const and let instead of var in Javascript?
Secondly, different rules apply for scoping. Since let attaches to the scope of whatever block {…}. Use let ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found