Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript and the DOM (Retiring) Getting a Handle on the DOM Learning More

Derick Brown
Derick Brown
7,361 Points

Using "const" as variable good or bad for browser compatibility?

Is using "const" a good or bad idea?

I read we should start using "let" and "const" to replace "var". According to the video of this course, IE 11 seems to be the only version of IE that supports this. With that being said, is it a good idea to use let and const? I would think we would still use "var" for users who are on IE 10 and earlier.

Can you guys give me a little insight?

1 Answer

Steven Parker
Steven Parker
231,248 Points

How long do you need to support obsolete versions?

IE11 was released in October of 2013, and IE10 and below are no longer supported. Is there some reason that your anticipated user base could not (or just would not) have upgraded by now?

Also, Can I use? estimates IE versions older than 11 are in use by only 0.84% of users globally. Do you have reason to suspect a critical number of your target users are in that group?

Derick Brown
Derick Brown
7,361 Points

Thanks for the insight Steven.

No I'm not anticipating anything. I'm so used to working for companies with the oldest of the old computers and browsers lol so I automatically went into "must support IE 6" mode hahaha. But overall, this is great information so thanks! I didn't look more into the results like I should.