The given sequence of paths is processed from right to left, with each subsequent
path prepended until an absolute path is constructed.
For instance, given the sequence of
path segments: /foo, /bar, baz, calling path.resolve('/foo', '/bar', 'baz')
would return /bar/baz because 'baz' is not an absolute path but '/bar' + '/' + 'baz' is.
I am not understanding the behaviour of path.resolve()
method of node’s built in path module.
Please elaborate on this a bit for me. TIA