Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 「配列」の章における typo などを修正 #1583

Merged
merged 1 commit into from
Feb 11, 2023

Conversation

morinokami
Copy link
Contributor

「配列」の章において何点か誤記や記述が一貫性を欠く箇所などを見つけたため、修正しました。

@bot-user
Copy link

Deploy Preview for js-primer ready!

Name Link
🔨 Latest commit cc04fd8
🔍 Latest deploy log https://app.netlify.com/sites/js-primer/deploys/63e65b7a9baa6500079c3d62
😎 Deploy Preview https://deploy-preview-1583--js-primer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

const sparseArray = [1,, 3];
const sparseArray = [1, , 3];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[1,,3] または [1, , 3] のいずれかでないとスペースの置き方としておかしいと思いました。章の後半の

const sparseArray = [1, , 3];

などで後者の書き方がされていたため、そちらに合わせました。

Comment on lines -511 to +515
// 引数なしは 1 を指定した場合と同じ
// 引数なしは1を指定した場合と同じ
console.log(array.flat()); // => [["A"], "B", "C"]
console.log(array.flat(1)); // => [["A"], "B", "C"]
console.log(array.flat(2)); // => ["A", "B", "C"]
// すべてをフラット化するには Infinity を渡す
// すべてをフラット化するにはInfinityを渡す
Copy link
Contributor Author

@morinokami morinokami Feb 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

js-primer の文章(コメントなども含む)では数字や英単語のまわりにスペースを置く書き方はしていないと思いますが、なぜかここではスペースがありました。一貫性を保つため削除しました。

@@ -537,7 +537,6 @@ console.log(array.flat()); // => ["A", "B", "C"]
`splice`メソッドを利用すると、削除した要素を自動で詰めることができます。
`splice`メソッドは指定したインデックスから、指定した数だけ要素を取り除き、必要ならば要素を同時に追加できます。

{{book.console}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここは実行されることを意図したプログラムではないと思うので、削除しました。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

今気付きましたが、#1582 の issue と同内容のようです。

@azu azu merged commit bf0f5f5 into asciidwango:master Feb 11, 2023
@azu
Copy link
Collaborator

azu commented Feb 11, 2023

ありがとうございます

@azu azu added Type: Errata 誤記、誤字、表記揺れ Type: Need to Publish Publishに反映したほうがよいもの labels Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Errata 誤記、誤字、表記揺れ Type: Need to Publish Publishに反映したほうがよいもの
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants