Write unit tests, document code, optimize code, explain code. I've tried Python functions and React code. It even converted a class based React component to a functional style component!
Sorry, I really meant refactor here. I did ask it to optimize code, and it came with a suggestion of trimming down my function into a smaller chunk and creating a new function. So it actually refactored it TBH, but I am going to try how I can check if it can optimize code too.