Skip to content

Commit 5856be8

Browse files
committed
Clarify Windows file creation instructions
1 parent c6cdc5e commit 5856be8

2 files changed

Lines changed: 31 additions & 8 deletions

File tree

problems/introduction/problem.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,27 @@ Change directory into the `javascripting` folder:
1212
cd javascripting
1313
```
1414

15-
Create a file named `introduction.js`:
15+
Create a file named `introduction.js`.
16+
17+
On macOS or Linux:
1618

1719
```bash
1820
touch introduction.js
1921
```
2022

21-
Or if you're on Windows:
22-
```bash
23+
On Windows PowerShell:
24+
25+
```powershell
26+
New-Item introduction.js -ItemType File
27+
```
28+
29+
On Windows Command Prompt (`cmd.exe`):
30+
31+
```bat
2332
type NUL > introduction.js
2433
```
25-
(`type` is part of the command!)
34+
35+
You can also create the file directly in your text editor. Make sure it is saved as UTF-8.
2636

2737
Open the file in your favorite editor, and add this text:
2838

@@ -41,4 +51,3 @@ By the way, throughout this tutorial, you can give the file you work with any na
4151
```bash
4252
javascripting verify catsAreAwesome.js
4353
```
44-

problems/introduction/problem_ja.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,27 @@ mkdir javascripting
1212
cd javascripting
1313
```
1414

15-
次のコマンドで `introduction.js` ファイルを作成します。
15+
`introduction.js` という名前のファイルを作成します。
16+
17+
macOS または Linux の場合:
1618

1719
```bash
1820
touch introduction.js
1921
```
20-
(Windowsを使っているのであれば `type NUL > introduction.js`)
22+
23+
Windows PowerShell の場合:
24+
25+
```powershell
26+
New-Item introduction.js -ItemType File
27+
```
28+
29+
Windows のコマンドプロンプト(`cmd.exe`)の場合:
30+
31+
```bat
32+
type NUL > introduction.js
33+
```
34+
35+
テキストエディタから直接ファイルを作成しても構いません。その場合は UTF-8 で保存してください。
2136

2237
お好みのエディタでファイルを開きます。次の文を書き足しましょう。
2338

@@ -30,4 +45,3 @@ console.log('hello')
3045
```bash
3146
javascripting verify introduction.js
3247
```
33-

0 commit comments

Comments
 (0)