Say the first one is an empty string, that means it's an absolute path. So you could force push the first element then start the for loop at 1. Like so:
```javascript
nonEmptySegments.push(segments[0]);
for (var i = 1; i < segments.length; i++) {
```
Then the `return (isAbsolute ? '/' : '') + path;` isn't necessary at the bottom because `[ '', 'a', 'b', 'c' ].join('/') == '/a/b/c'`. So it'll auto resolve whether the path is absolute or not.