How can i get the center of a boundingbox?

I used this code
Screen Shot 2023-04-12 at 5.53.58 PM
And yet i still get this error
Screen Shot 2023-04-12 at 5.54.35 PM
Please tell me what did i do wrong?

See the documentation → getCenter requires a parameter.

(Hard to tell without a live example)

The getCenter() method expects a vector3 as a parameter, the result will be copied into that.

Try with the following:
Var a = new THREE.Vector3( 0, 1, 0 );
Object.geometrĂ½.boundingBox.getCenter(a)
Console.log(a)

Thanks it works