Introduction
We use path.resolve to get the full absolute path from relative parts. It helps find the exact location of files or folders on your computer.
When you want to find the full path of a file starting from your current folder.
When combining folder names and file names to get one complete path.
When you need to avoid mistakes caused by relative paths like './' or '../'.
When writing scripts that work on any computer regardless of where they run.
When you want to make sure your program uses the correct file location.