A JavaScript project built for the FreeCodeCamp JavaScript Algorithms and Data Structures Certification. This validator checks whether a given string is a valid US telephone number based on the projectโs required test cases.
Validates US phone numbers using JavaScript
-
Supports multiple valid formats (parentheses, spaces, hyphens, etc.)
-
Rejects invalid or incorrectly formatted numbers
-Passes all FreeCodeCamp test requirements for the Telephone Number Validator project
-
JavaScript
-
Basic DOM interaction
-
Logic-based pattern checking
-
script.js โ main validation logic
-
README.md โ project documentation
-
LICENSE โ MIT License
This project helped me practice:
-
Writing clean, testโdriven JavaScript
-
Understanding string validation and pattern logic
-
Solving algorithmic problems without relying on regex
-
Strengthening problemโsolving skills for realโworld input validation
-
Add a simple UI to test numbers in the browser
-
Add regex version vs. logicโbased version
-
Add unit tests using Jest
This project is licensed under the MIT License