Can I use ES6+ language in a library script thats ...
# suitescript
e
Can I use ES6+ language in a library script thats being pulled into a 2.0 Script?
e
No - unless all you're using is const
e
Was looking to use arrows functions... sounds like those would be no good?
e
It'll break
m
No, also beware that even though const doesn't throw an error in SS2.0 it doesn't work as excpected
e
Thanks for saving me the heading
s
lol i learnt the hard way
e
You have to remember that 2.0 and 2.1 are completely different JavaScript engines
so they do not mix
s
meaning ?
e
2.0 runs on Rhino
2.1 runs on Graal
They're completely different server execution runtimes, so you can't mix them
s
if that is true it shouldnt be 2.0 and 2.1 rather 3.0
symentic versioning any majos changes
e
I don't disagree, but we don't make that decision
s
lol so true
i assumed they were simlaiar from the fact that it is 2.1 @erictgrubaugh thanks for the info
e
First statement:
"uses a different runtime environment"