Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

eval 해답 번역#225

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
1000peach wants to merge1 commit intojavascript-tutorial:masterfrom1000peach:solution_eval
Closed

eval 해답 번역#225

1000peach wants to merge1 commit intojavascript-tutorial:masterfrom1000peach:solution_eval

Conversation

1000peach
Copy link
Contributor

eval/solution.md 번역입니다. 리뷰 부탁드립니다.


To make things safe, and limit it to arithmetics only, we can check the `expr` using a [regular expression](info:regular-expressions), so that it only may contain digits and operators.
입력한 문자열을 산술적으로 제한하여 안전하게 eval로 실행하기 위해, [정규 표현식](info:regular-expressions)을 사용하여 `expr`을 검사하면 숫자와 연산자만 포함하게 됩니다.

Choose a reason for hiding this comment

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

입력한 문자열을 산술적으로 제한하여라는 말이 잘 안와닿네요.
산술식만 입력하도록 제한한다는 의미인데, 조금 풀어써주세요.

@@ -1,11 +1,11 @@
Let's use`eval` to calculate the maths expression:
산술 표현식을 계산하기 위해`eval`을 사용해봅시다.

```js demo run
let expr = prompt("Type an arithmetic expression?", '2*3+2');

Choose a reason for hiding this comment

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

프롬프트 창에 뜨는 메시지도 번역해주면 어떨까요?

@javascript-translate-bot

Please make the requested changes. After it, add a comment "/done".
Then I'll ask for a new review 👻

@1000peach1000peach deleted the solution_eval branchOctober 14, 2019 01:55
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@Violet-Bora-LeeViolet-Bora-LeeViolet-Bora-Lee requested changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@1000peach@javascript-translate-bot@Violet-Bora-Lee

[8]ページ先頭

©2009-2025 Movatter.jp