I'm not sure where you saw that UFT supports JavaScript, Visual Basic and Visual C++, but the UFT IDE for GUI tests only supports VBScript. See [this link][1] for info.
API Tests support custom code written in C#. See [this link][2] for more info.
The only way you would be able to use other languages in GUI tests would be to compile a .dll then reference the functions in the .dll [using the Extern.Declare method][3].
[1]: https://admhelp.microfocus.com/uft/en/latest/UFT_Help/Content/User_Guide/z_Ch_ProgTestDocsEditor.htm
[2]: https://admhelp.microfocus.com/uft/en/latest/UFT_Help/Content/User_Guide/task_new_activity_c.htm?Highlight=dll#hp-minitoc-item-4
[3]: https://admhelp.microfocus.com/uft/en/latest/UFT_Help/Subsystems/FunctionReference/Subsystems/OMRHelp/OMRHelp.htm#OV_Supp_Util/Utility_Extern.htm