It's complicated! ExtendScript itself is based on ECMAScript 3 standard. However, that doesn't mean the Debugger was written in old ECMAScript!
My team is working on modernizing extensibitilty at Adobe, and the newer UXP APIs (now available in XD and Photoshop) are based on ECMAScript 6 (or greater) and do not use ExtendScript. I'll paste some links that I hope will help you below: