Is there any reason why I should not be using let instead of var when writing Lightning Components? I would much rather use let if possible but I dont want to run into any compatibility issues


For a while, cross-browser support meant that IE 11 was holding everyone back. There's currently no transpiler (though its been said to be in the works), so if you enabled Extended Internet Explorer 11 mode, be aware that your components may not work in IE 11 if you use let. If you don't support IE 11, then there's no reason to not use it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.