Skip to content

London | 26-ITP-JAN | Shuheda Begum | Sprint 2 | Structuring and Testing Data#984

Closed
codebyshay wants to merge 26 commits intoCodeYourFuture:mainfrom
codebyshay:main
Closed

London | 26-ITP-JAN | Shuheda Begum | Sprint 2 | Structuring and Testing Data#984
codebyshay wants to merge 26 commits intoCodeYourFuture:mainfrom
codebyshay:main

Conversation

@codebyshay
Copy link

@codebyshay codebyshay commented Feb 18, 2026

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

i have fixed errors on 0.js file.

Questions Answered
@github-actions

This comment has been minimized.

5 similar comments
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Fixed code and tested.
Added my prediction
Code amended and working.
Explanation of syntax error and new code
Prediction and explanation
New Code
Prediction and explanation
New code updated
Predicted, anded explanation and fixed code.
Fixed spelling
Made notes and built a code to calculate bmi.
Made notes for code requirements.
Used MDN.
Developed code that runs.
Located original code
Made notes
Worked on a code
Questions answered
Code fixed.
Tested with various times.
@codebyshay codebyshay added 🏕 Priority Mandatory This work is expected 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels Feb 20, 2026
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Code looks good. Just have a question.

Comment on lines 6 to 8
const num = 103;
//const num = 103;
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: Deleting the global num is optional. If we declared a parameter that's also named num, then within the function block, the identifier num is resolved to the parameter num.

If you are interested in the topic, you can looking up these two concepts, identifier scope and identifier resolution, in the context of JavaScript programming. ChatGPT can give a good explanation.


function calculateBMI(weight, height) {
const bmi = weight / (height * height);
return bmi.toFixed(1);
Copy link
Contributor

Choose a reason for hiding this comment

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

What type of value do you expect your function to return? A number or a string?
Does your function return the type of value you expect?

Different types of values may appear identical in the console output, but they are represented and treated differently in the program. For example,

  console.log(123);              // Output 123
  console.log("123");            // Output 123
  
  // Treated differently in the program
  let sum1 = 123 + 100;         // Evaluate to 223 -- a number
  let sum 2 = "123" + 100;      // Evaluate to "123100" -- a string.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Feb 25, 2026
@cjyuan
Copy link
Contributor

cjyuan commented Feb 25, 2026

The Cangelist section of the PR description does not quite describe what you have changed. Can you update it accordingly to better reflect what you have changed on this PR branch?

Used the notes to write 'if' statements that reflect the requirements. e.g. "Acute angle" for angles greater than 0° and less than 90° becomes, if (angle > 0 && angle < 90) {
    return "Acute angle";
I wrote tests to cover all cases, including boundary and invalid.
Defined proper fractions and implemented isProperFraction function.
Add comprehensive tests for isProperFraction including edge cases
Add getCardValue logic for ranks and suits.
Add comprehensive tests including error handling for invalid cards
Add comprehensive Jest tests covering all angle cases.
Add comprehensive Jest tests covering positive, negative, zero, and edge cases for isProperFraction.
Add Jest tests for Ace, number, face, and invalid cards for getCardValue.
@codebyshay codebyshay closed this by deleting the head repository Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Structuring-And-Testing-Data The name of the module. 🏕 Priority Mandatory This work is expected Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants