There's a path object that we need to create a path from. The path module is already imported. Try to write the remaining code.
Intro to path module
Build a path
Report a typo
Sample Input 1:
{
root: '/',
name: 'file',
ext: '.txt',
}Sample Output 1:
/file.txtWrite a program in JavaScript
const path = require('path');
const pathObj = {
root: '/',
name: 'file',
ext: '.txt',
};
const resultPath = /* write your code here */
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.