en.javascript.info/1-js/4-data-structures/3-string/4-extract-currency/task.md
2015-04-01 19:08:41 +03:00

8 lines
398 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Выделить число
[importance 4]
Есть стоимость в виде строки: `"$120"`. То есть, первым идёт знак валюты, а затем -- число.
Создайте функцию `extractCurrencyValue(str)`, которая будет из такой строки выделять число-значение, в данном случае 120.