DEV Community 👩‍💻👨‍💻

Discussion on: Improve your JS skills with those tips #1

heyrohit profile image
Rohit Gupta

Very Nice

Some of the features are from ES6 and later
For some older browsers, use indexOf in place of includes:

if (['a', 'b', 'c'].indexOf(value) > -1) { ... }
Enter fullscreen mode Exit fullscreen mode

While I encourage developing for clients that have no problems to adapt only mainstream browsers like chrome. firefox, you can persuade them to avoid using deprecated browser support for better code readability.

codeoz profile image
Code Oz Author

Nice thank you Rohit!

kenovienadu profile image
Ovienadu Ken

Yea, we should take advantage of the newer syntax and utilize tools like babel to transpile for older browsers.