0%

709_path模块

const path=require('path')

//resolve 解决拼接路径
console.log(path.resolve(__dirname,'index.html'));//A:\nodejs\code\path模块\index.html
console.log(path.resolve(__dirname,'./index.html'));//A:\nodejs\code\path模块\index.html