- Notifications
You must be signed in to change notification settings - Fork111
Eval: run a code string#270
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
Uh oh!
There was an error while loading.Please reload this page.
Closed
Changes fromall commits
Commits
Show all changes
37 commits Select commitHold shift + click to select a range
15d0c57
Update article.md
HakaCoded0c9961
Merge pull request #1 from HakaCode/master
HakaCode3e66630
Revert "Update article.md"
HakaCodeaa9bf40
Fix things and translate the summary of eval article
8de0cf3
Update article.md
e1237c2
Update article.md
514360d
Update article.md
e53e33a
Update task.md
ea04503
Merge branch 'master' into revert-1-master
bc970cb
Merge pull request #2 from ashuradev/revert-1-master
462fe29
Update article.md
HakaCode674bdd4
Merge pull request #3 from HakaCode/master
be6157f
Update article.md
HakaCodecb7e241
Update article.md
65ee8f0
Merge branch 'master' into fix-conflicts
b3ebc0d
Update 1-js/99-js-misc/02-eval/1-eval-calculator/task.md
dea981d
Update 1-js/99-js-misc/02-eval/article.md
627898f
Update 1-js/99-js-misc/02-eval/article.md
5589be2
Update 1-js/99-js-misc/02-eval/article.md
47c9e89
Update 1-js/99-js-misc/02-eval/article.md
9385f54
Update 1-js/99-js-misc/02-eval/article.md
80feedb
Update 1-js/99-js-misc/02-eval/article.md
e1cca32
Update 1-js/99-js-misc/02-eval/article.md
980f579
Update 1-js/99-js-misc/02-eval/article.md
75371f9
Update 1-js/99-js-misc/02-eval/article.md
32ce693
Update 1-js/99-js-misc/02-eval/article.md
05dd276
Update 1-js/99-js-misc/02-eval/article.md
3585e5a
Update 1-js/99-js-misc/02-eval/article.md
7680f57
Update 1-js/99-js-misc/02-eval/article.md
cf4d973
Update 1-js/99-js-misc/02-eval/article.md
26ffb20
Update 1-js/99-js-misc/02-eval/article.md
1f002e2
Update 1-js/99-js-misc/02-eval/article.md
3cc8dab
Update 1-js/99-js-misc/02-eval/article.md
2c95a88
Update article.md
odsantos2bf304a
Update article.md
odsantos8756ef0
Add solution translation
odsantos3691f56
Merge branch 'master' into fix-conflicts
odsantosFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
8 changes: 4 additions & 4 deletions1-js/99-js-misc/02-eval/1-eval-calculator/solution.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
Vamos usar `eval`para calcular a expressão matemática: | ||
```js demo run | ||
let expr = prompt("Escreva uma expressão aritmética?", '2*3+2'); | ||
alert( eval(expr) ); | ||
``` | ||
Contudo, o usuário pode dar entrada a qualquer texto ou código. | ||
Para tornar as coisas seguras, e limitar a entrada a apenas aritméticas, nós podemos checar`expr`usando uma [expressão regular](info:regular-expressions),de forma que apenas possa conter dígitos e operadores. |
6 changes: 3 additions & 3 deletions1-js/99-js-misc/02-eval/1-eval-calculator/task.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
74 changes: 37 additions & 37 deletions1-js/99-js-misc/02-eval/article.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.