I am using Jmeter 5.4 but with this also I am not able to use js 6 and above in JSR223 sampler. My problem at hand is I have an SDK which supports js 6 and above and I would like to make use of this sampler to test the sdk. Is there a way I can upgrade the js 5.1 to 6 or above?
Add the next line to system.properties file:
nashorn.args=--language=es6
and upon JMeter restart you should be able to use ECMAScript 6 syntax
More information: