Change The Size Of A Mac Window With JavaScript

This works with one way to make the change but there's a second way as well

Code
#!/usr/bin/env osascript -l JavaScript

/*
Application("Google Chrome").windows[0].bounds = {
    "x": 20, "y": 20, "width": 800, "height": 900
}
*/

const appName = "Emacs"

const bounds = Application(appName).windows[0].bounds()

Application(appName).windows[0].bounds = {
// "x": 200, "y": bounds["y"], "width": bounds["width"], "height": bounds["height"]
"x": 10, "y": 100, "width": 900, "height": 500
}