How do you determine if you can use certain code or not (crossbrowser, etc)

How do you determine if you can use certain code or not (crossbrowser, etc)
0

#1

I was watching a course that was talking about spread operators, and how it is what the newer version of Javascript will use. I personally for example like using templating instead of the old string concatenation. I’m still not clear when I can use something or not, I mean in a profesional environment, client websites, etc. How do you guys check if your code is compatible with IE9 for example? Or if a certain functionality like templates can be used or not?

Thanks in advance.


#2

http://caniuse.com/#search=templates


#3

That’s great, thank you.


#4

@Sergi-O Babel is a great tool to transpile the newer JavaScript syntax (ES6 and beyond) into ES5 which virtually all browsers understand. If you need to check if a specific functionality is available in a browser, CanIUse is a great tool and these extensions for Chrome and Atom make it easier to view support tables quickly in your browser or in Atom (if you use that) while coding.


#5

Thank you as well, I knew about Babel, I was wondering about CSS rules too, and CanIUseIt covers that so I’m all set.