Converting a Text Field to US Currency

I know this has been a common question. But I am still trying to figure it out. I have buttons that perform calculations and the result will show in a text field. I simply want that text field to show as US currency, Right now it will show as “10000.00”, I would like it to show as “$10,000.00” I will paste a snippet of some of my code (the calculations), any help will be greatly appreciated.

$w( “#text2” ).text = (dropdown5dropdown6text2).toFixed( 2 ).toString();
$w( “#text4” ).text = (dropdown5dropdown6text4).toFixed( 2 ).toString();

Thank you in advance for any help.

use:
number. toLocaleString(‘en-US’, { style: ‘currency’, currency: ‘USD’ });

Thank you for your response, but where exactly do I apply this to my code. Thank you J.D.

@bensmitth
Where you need it, (I couldn’t understand from your code what exactly you’re trying to do).