How can I format this date '1/6/2003' to '01/06/2003' using JavaScript in Katalon Recorder?

How about try to put parentheses around the date so we include all date parts and then give it that format, like below:

storeEval | var d=new Date(); new Date((d.getMonth()+1),(d.getDate()+1),(d.getFullYear()-21)).format("MM/dd/yyyy"); | birthDate

Edit: And I found this thread: