# path.join

Function · category: Other

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/core/path.js#L26

```ts
join(...sections: string[]): string
```

Join two or more sections of file path together, inserting a delimiter if needed.

**Parameters**

- `sections` (`string[]`): Sections of the path to join.

**Returns** `string`: The joined file path.

**Example**

```ts
const joinedPath = path.join('foo', 'bar');
console.log(joinedPath); // Prints 'foo/bar'
```

**Example**

```ts
const joinedPath = path.join('alpha', 'beta', 'gamma');
console.log(joinedPath); // Prints 'alpha/beta/gamma'
```
