File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11describe ( "extractCurrencyValue" , function ( ) {
22
3- it ( "for the string $120 returns the number 120" , function ( ) {
3+ it ( "dla ciągu $120 zwraca numer 120" , function ( ) {
44 assert . strictEqual ( extractCurrencyValue ( '$120' ) , 120 ) ;
55 } ) ;
66
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ importance: 4
22
33---
44
5- # Extract the money
5+ # Wyciągnij liczbę
66
7- We have a cost in the form ` "$120" ` . That is: the dollar sign goes first, and then the number .
7+ Mamy koszty zapisane w postaci ciągu ` "$120" ` . Oznacza to, że najpierw pojawia się znak dolara, a następnie liczba .
88
9- Create a function ` extractCurrencyValue(str) ` that would extract the numeric value from such string and return it .
9+ Stwórz funkcję ` extractCurrencyValue(str) ` która wydobędzie wartość liczbową z takiego ciągu i ją zwróci .
1010
11- The example :
11+ Na przykład :
1212
1313``` js
1414alert ( extractCurrencyValue (' $120' ) === 120 ); // true
You can’t perform that action at this time.
0 commit comments