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(loop): for...in文についてのES2020の変更点を反映 #1194

Merged
merged 2 commits into from
Jun 28, 2020

Conversation

azu
Copy link
Collaborator

@azu azu commented Jun 28, 2020

for...in文がプロパティを列挙する順番はES2019までは実装依存だった。
これがES2020では仕様として列挙する順番が規程されたので、異なる列挙をするブラウザは基本的になくなる。(現時点ではすでにどのブラウザも同じ順番)
背景としては、Reflect.ownKeys(ES2015)が入った際に大体の実装が同じ列挙順に統一されたため、仕様が修正された。

詳細

fix #1180

@bot-user
Copy link

bot-user commented Jun 28, 2020

Deploy preview for js-primer ready!

Built with commit 7bac072

https://deploy-preview-1194--js-primer.netlify.app

@azu azu changed the title fix(loop): for...in文のES2020の変更点を追加 fix(loop): for...in文についてのES2020の変更点を反映 Jun 28, 2020
@@ -317,7 +317,7 @@ const filteredArray = array.filter((currentValue, index, array) => {

## for...in文 {#for-in-statement}

for...in文はオブジェクトのプロパティに対して、順不同で反復処理を行います。
for...in文はオブジェクトのプロパティに対して、反復処理を行います。[^1]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

source/basic/loop/README.md Outdated Show resolved Hide resolved
@azu azu merged commit 3f0f1f1 into master Jun 28, 2020
@azu azu deleted the feat/1180-for-in branch June 28, 2020 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ES2020: for-in mechanics
2 participants