Skip to content

Commit a9977bb

Browse files
committed
complete correction
1 parent 1177a65 commit a9977bb

3 files changed

Lines changed: 19 additions & 16 deletions

File tree

Sprint-1/3-mandatory-interpret/1-percentage-change.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ console.log(`The percentage change is ${percentageChange}`);
2121

2222
// e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression?
2323

24-
//a: There are three function calls, which are: Number(...), replaceAll(...) and console.log(...)
25-
// Function call lines: 1. carPrice = Number(carPrice.replaceAll(",", ""));
26-
// 2. priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," ""));
27-
// 3. console.log(`The percentage change is ${percentageChange}`);
24+
//a: There are five function calls, which are: Number(...), replaceAll(...) and console.log(...)
25+
// Function call lines: 1. (carPrice.replaceAll(",", ""));
26+
// 2. Number(carPrice.replaceAll(",", ""));
27+
// 3. Number(priceAfterOneYear.replaceAll("," ""));
28+
// 4. (priceAfterOneYear.replaceAll("," ""));
29+
// 5. console.log(`The percentage change is ${percentageChange}`);
2830

2931
//b: priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," "")) has an error,SyntaxError: Unexpected string
3032
// missing a comma between the arguments of replaceAll.

Sprint-1/3-mandatory-interpret/2-time-format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ console.log(result);
3535
// Answer d:it calculates the number of full minutes in the total movie length. so 8784-24=8760/60=146 minutes
3636

3737
// Answer e: this builds a string representing the time in HH:MM:SS format, based on the movie length in seconds. The better name can be
38-
// formattedTime or timeString.
38+
// movieDuration,movieDurationFormatted oe formattedMovieLength
3939

4040
// Answer e: It will work for most large integers or large hours but it does not work well for time below 60 seconds like 37 seconds is
4141
// 0:0:37 which can be considered unformatted. What is more, it does not handle negative numbers and does not pad numbers with zero.

Sprint-1/4-stretch-explore/chrome.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,18 @@ the pop up box:chrome://new-tab-page says Hello world! i press ok button, retu
2424
<.'ping'
2525
Warning: Don’t paste code into the DevTools Console that you don’t understand or haven’t reviewed yourself. This could allow attackers to steal your identity or take control of your computer. Please type ‘allow pasting’ below and press Enter to allow pasting.
2626
allow pasting
27-
>let myName = prompt("What is your name?");
28-
the pop up box:chrome://new-tab-page says, i ignore blue box just press cancel,
29-
<.console.log("Your name is:", myName);
30-
VM255:2 Your name is: null
31-
undefined
32-
>let myName = prompt("What is your name?");
33-
in pop up box: chrome://new-tab-page says, i put my name'ping' in blue box then press ok
34-
<.console.log("Your name is:", myName);
35-
VM259:2 Your name is: ping
36-
undefined
37-
The value returned from prompt() is stored in the variable myName. The pop up box pauses the JS execution until i press the button either'cancel' or put my name before press'OK'.
27+
The value returned from prompt() is stored in the variable myName.
28+
The pop-up box pauses JavaScript execution until the user responds by either:
29+
30+
typing a value and pressing OK → returns the input string, or
31+
32+
pressing Cancel → returns null.
33+
This return value can then be used in the program, for example:
34+
35+
console.log("Your name is:", myName);
36+
37+
38+
In some Chrome setups, I may need to grant permissions to allow pop-ups for prompt to work properly in DevTools.
3839

3940

4041

0 commit comments

Comments
 (0)