# node-study **Repository Path**: shen_xu_he/node-study ## Basic Information - **Project Name**: node-study - **Description**: node 基本语法 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-11-28 - **Last Updated**: 2023-12-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 1 nodejs 基本语法及概念 ## 1. 内置模块 文件操作模块 fs模块 ### 1.1 文件写入 ```js // 引入 const fs = require("fs"); // 01. 异步写入 fs.writeFile("./01-fs模块/01.txt", "hello world !", (error) => { if (error) { console.log("写入失败", error); } else { console.log("写入成功"); } }); // 02. 同步写入 fs.writeFileSync('./01-fs模块/02.txt','hi world') ``` ###