How do I export my game for Xbox platforms?

I’m planning on getting an XDK soon to test the game on xbox. How do I export it for xbox?

You don’t. There isn’t any form of Xbox export in the engine.

You could try exporting to HTML5 or desktop and then converting it as needed, but Microsoft dropped html5 wrapper support for the Microsoft store (HTML5 UWP) a year or two ago. So there isn’t any 1:1 direct way/workaround anymore.

You would have to convert the exported code into something the Xbox sdk supports, which would mean directly porting from Javascript to a programming language the Xbox supports.