Forum Discussion
Yes, we still use the Nashorn engine for JavaScript. It’s deprecated but still present in Java 11.
I can’t speak to how anyone debugs their JS scripts.
Thanks for the rapid reply!
I’m hoping that a long-term Snaplogic user might chirp up with some phenomenally useful tricks that let me find problem code in our JS snaps and fix it.
- cjhoward187 years agoEmployee
glad it was helpful.
You can use a map to store your values instead of an array and store the values as your keys. Maps do not allow for duplicate key entries, which would take care of this problem for you, and you could collect your ‘values array’ by using keys() method described here:
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439367/Object+Functions+and+Properties#ObjectFunctionsandProperties-keysThis is just one solution, there are many ways you can keep track of this if needed.
Related Content
- 2 years ago