Yes, that builtin extension formats JavaScript and TypeScript code.
If you want to configure the default formatter for a JavaScript file that is open, right-click inside and select the option "Format document with.." from the context menu.
That will show a quickpick in the command palette with the available formatters, you can select the option "Configure default formatter.." to set the default formatter. The second option for me is: "TypeScript and JavaScript Features". Selecting it will add this snippet to your Settings.json:
Yes, that builtin extension formats JavaScript and TypeScript code.
If you want to configure the default formatter for a JavaScript file that is open, right-click inside and select the option "Format document with.." from the context menu.
That will show a quickpick in the command palette with the available formatters, you can select the option "Configure default formatter.." to set the default formatter. The second option for me is: "TypeScript and JavaScript Features". Selecting it will add this snippet to your Settings.json:
Running the command "Format document" from the command palette should format your code then.
If it does not work for you, something else is probably up! Prob best to post your issue on Stackoverflow in that case.