Skip to content

London | May 2025 | Victoria Scott | Sprint 1 Coursework #684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

VictoriaScottCodes
Copy link

Self checklist

  • [ x ] I have committed my files one by one, on purpose, and for a reason
  • [ x ] I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • [ x ] I have tested my changes
  • [ x ] My changes follow the style guide
  • [ x ] My changes meet the requirements of this task

Answering questions in Sprint 1

@VictoriaScottCodes VictoriaScottCodes added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 26, 2025
@kodnificent kodnificent self-requested a review July 28, 2025 12:52
@kodnificent kodnificent added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jul 28, 2025
Copy link

@kodnificent kodnificent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job here @VictoriaScottCodes

I gave some minor feedback.

We don't want the computer to run these 2 lines - how can we solve this problem?

// To stop the computer from running those two lines, we can turn them into comments by adding // at the beginning of each line. This tells the computer to ignore the line because it is only meant for humans to read.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think you can implement the solution you provided? That is adding // at the beginning of each line?

@@ -7,3 +7,5 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum;
// Try breaking down the expression and using documentation to explain what it means
// It will help to think about the order in which expressions are evaluated
// Try logging the value of num and running the program several times to build an idea of what the program is doing

// The variable num stores a random whole number between 1 and 100. The code uses Math.random() to get a number between 0 and 1. It then multiplies that number to get a value between 0 and 100. Math.floor() rounds it down to a whole number. Finally, it adds 1 so the result is between 1 and 100. Each time you run the code, num will be a different number in that range.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think you could go further by writing some tests to confirm this?


Now enter just `console` in the Console, what output do you get back?
console {debug: ƒ, error: ƒ, info: ƒ, log: ƒ, warn: ƒ, ...}

Try also entering `typeof console`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What output would you get back from entrying typeof console?

@kodnificent kodnificent added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Aug 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed Volunteer to add when completing a review with trainee action still to take.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants