button := js.Global.Get("document").Call("getElementById", "myButton") buttonText := button.Get("textContent").String() fmt.Println(buttonText)
myArray := js.Global.Get("myArray") length := myArray.Get("length").Int() fmt.Println(length)This code retrieves an array object from the global scope and then gets its `length` property using `Get`. The resulting integer value is printed to the console. Overall, the `github.com/gopherjs/gopherjs/js` package provides a convenient way to interact with JavaScript objects and functions from Go code.