File tree Expand file tree Collapse file tree 3 files changed +12
-11
lines changed
02.variables/01.problem.let-and-const
03.primitive-types/01.solution.numbers-and-strings Expand file tree Collapse file tree 3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,4 @@ const API_URL = 'https://api.example.com'
1919
2020📜 [ MDN - const] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const )
2121
22- <callout-info >
23- You might notice JavaScript sometimes produces surprising decimal results like
24- ` 0.1 + 0.2 = 0.30000000000000004 ` . This is due to how computers store decimal
25- numbers in binary (floating point representation). It happens in most
26- programming languages, not just JavaScript. For currency calculations in real
27- apps, consider working in cents (integers) or using specialized libraries.
28- </callout-info >
29-
30- 📜 [ MDN - Number representation] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding )
31-
3222🐨 Once you've completed the exercise, run ` node index.ts ` in the playground to test your work!
Original file line number Diff line number Diff line change @@ -17,3 +17,13 @@ const productName = 'TypeScript Guide' // TypeScript infers: string
1717The explicit type annotations (` : number ` , ` : string ` ) are optional here but
1818help document your intent. We'll see when they become essential in later
1919exercises.
20+
21+ <callout-info >
22+ You might notice JavaScript sometimes produces surprising decimal results like
23+ ` 0.1 + 0.2 = 0.30000000000000004 ` . This is due to how computers store decimal
24+ numbers in binary (floating point representation). It happens in most
25+ programming languages, not just JavaScript. For currency calculations in real
26+ apps, consider working in cents (integers) or using specialized libraries.
27+ </callout-info >
28+
29+ 📜 [ MDN - Number representation] ( https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number#number_encoding )
Original file line number Diff line number Diff line change 1515 "host" : " www.epicweb.dev" ,
1616 "displayName" : " EpicWeb.dev" ,
1717 "displayNameShort" : " Epic Web"
18- }
18+ },
19+ "appType" : " export"
1920 },
2021 "type" : " module" ,
2122 "scripts" : {
You can’t perform that action at this time.
0 commit comments