Skip to content

Conversation

@Fares-Bakhet
Copy link

Learners, PR Template

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

-Build up functions and check them.
-Pass Jest tests.

Questions

No questions.

@Fares-Bakhet Fares-Bakhet added 📅 Sprint 3 Assigned during Sprint 3 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 Oct 13, 2025
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.

Looks good!

Comment on lines +32 to +46
// Number must be 16 digits
console.log(validateCreditCard(9999)); // false
console.log(validateCreditCard(9999888877776662)); // true

// Must have at least two different digits
console.log(validateCreditCard(1111111111111111)); // false
console.log(validateCreditCard(1234567890123456)); // true

// Last digit must be even
console.log(validateCreditCard(1234567890123451)); // false
console.log(validateCreditCard(1234567890123452)); // true

// Sum of all digits must be greater than 16
console.log(validateCreditCard(1111111111111110)); // false
console.log(validateCreditCard(1234567890123456)); // true
Copy link
Contributor

Choose a reason for hiding this comment

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

Could also consider testing the boundary cases. e.g.,

  • sum of digits is 16
  • numbers with 15 digits
  • numbers with 2 distinct digits

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. Module-Structuring-And-Testing-Data The name of the module. 📅 Sprint 3 Assigned during Sprint 3 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants