CYF London | Fatma Arslantas | Module-Structuring-and-Testing-Data | Week 1 - #108
Closed
AFatmaa wants to merge 0 commit into
Closed
CYF London | Fatma Arslantas | Module-Structuring-and-Testing-Data | Week 1#108AFatmaa wants to merge 0 commit into
AFatmaa wants to merge 0 commit into
Conversation
maesierra
reviewed
Nov 9, 2024
| // You should look up Math functions for this exercise https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math | ||
|
|
||
| // Create a variable called wholeNumberPart and assign to it an expression that evaluates to 56 ( the whole number part of num ) | ||
| wholeNumberPart = Math.floor(num); // Math.floor() removes the decimal part by rounding down to the nearest whole number |
There was a problem hiding this comment.
This is great but it's usually a good habit to always use let or const when declaring your variables to make sure we are only declaring them once.
It's OK to keep it as it is. You don't need to make changes.
|
|
||
| // a) How many function calls are there in this file? Write down all the lines where a function call is made | ||
| // Number(carPrice.replaceAll(",", "")) — This line calls two functions: .replaceAll() and Number(). | ||
| // Number(priceAfterOneYear.replaceAll(",", "")) — This line also calls two functions: .replaceAll() and Number(). |
Author
There was a problem hiding this comment.
Hi Maesierra,
Thank you for your review! Do you mean I didn't write any comments for console.log? If so, I will add it. 😊
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.