Array.prototype.joinintermediateconst parts = ['usr', 'local', 'bin']
parts.join('/') // β 'usr/local/bin'Use join('/') to construct file paths from an array of path segments.
Joining path segments with '/' is a classic use case for join().
Challenge: Implement buildPath(parts) that joins path segments with '/'.
buildPath(['usr', 'local', 'bin']) // β 'usr/local/bin'
buildPath(['src', 'index.ts']) // β 'src/index.ts'