The toString() method is used to convert a function to string.The method converts the function back to the JavaScript source.The converted string includes all aspects of the defined function.