ECMAscript more or less "is" JavaScript.
Think of it this way: ECMAscript is the specification. JavaScript is the implementation.
Depending on where you run your JavaScript (in Firefox, Chrome, Edge, Safari, or on the server-side using Node.js, etc) you can have different implementations which react/work differently.
[edit]Link: https://en.wikipedia.org/wiki/ECMAScript