cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Arrow functions, filter, map & reduce! ThingWorx 8.5 supports ES6 functional programming

No ratings

I'm getting up to speed on all the great new stuff in 8.5, and have found that since the JavaScript engine was upgraded to Rhino 1.7.11, there's some awesome new JavaScript ES6 functionality available. I have tested arrow functions, filter, map, and reduce. Compose does not look like it is supported.

 

If you're not familiar with this functionality, I highly recommend reading up on them. Filter, map, and reduce are incredibly useful for working with arrays. They can save you a lot of annoying logic.

 

Here's some resources that I've found helpful for learning:

If you really want to dive into ES6, Wes Bos has incredible tutorial sessions that are worth every penny:

 

Have you played around with ES6 functionality in ThingWorx 8.5 yet?

Comments

I was on my way to test the ES6 features next week. Thanks for letting us know this!

 

Let me know what else you find... I just manually ran the examples from the first article to see if they worked.

 

I'm pretty happy to have "let" and "const" as well. I'll be switching my code to using those instead of "var".

Version history
Last update:
‎Oct 08, 2019 10:33 AM
Updated by:
Labels (1)
Tags (1)