A collection of projects designed to be a guide for the fundamental concepts of JavaScript Algorithms and Data Structures.
- Palindrome Checker
- Roman Numeral Converter
- Telephone Number Validator
- Cash Register
- Pokemon Search App
Checks if a word or phrase is a palindrome (reads the same backward as forward). By recieving input from a web page, this project compares the reversed version with the original to decide if it's a palindrome. The result is then displayed on the page.
checker()
: Function for checking if a given input (word or phrase) is a palindromeremovePunctuation(text)
: Helper function that removes punctuation and spaces from the input text
Converts decimal numbers (0-3999) into Roman numerals. After recieving input from the web page, the converter() function to performs the conversion. Elements are displayed using D3.
checker()
: Takes a number as input, validates it, and uses theconverter()
function to display the corresponding Roman numeralconverter(num)
: Recursively converts a given number into its Roman numeral equivalent.
Checks if a given input is a valid US phone number. Recieves the user's input and displays a message indicating whether it's a valid or invalid US number.
checkInput()
: Validates and displays whether a given input is a valid US phone numberclearInput()
: Resets the displayed results on the page
Simulates a virtual cash register, helping manage transactions and calculate change. Handles customer payments, updating change information and cash-in-drawer (cid) status.
purchase()
: Handles customer payments, updating change information and drawer statuscalculateChange(num)
: Breaks down change denominations based on a given amount, updating the 'cid' and 'outStr' propertieschangeUpdate()
: Displays the transaction status and possible changedrawer_change()
: Shows the remaining cidclear_change_div()
: Resets the total cash in the drawer, 'change_tracker' 'outStr' values, and removes displayed elements in the 'change_due' elementfloatFixer(num)
: Helper function to ensures accurate floating-point numbers
Allows users to explore information about different Pokémon. By fetching data from the PokeAPI based on user input, this project displays details such as the Pokémon's name, ID, image, types, stats, height, and weight. Elements are displayed using D3.
search()
: Fetches and displays information about a Pokémon based on user input from the PokeAPIbuildPage()
: Constructs the initial page layout, including Pokémon name, ID, image, types, stats, height, and weightupdatePage()
: Updates the displayed information on the pagetypeSelector()
: Dynamically generates and styles Pokémon type elementscalcStats(array)
: Calculates and visually represents Pokémon stats using barsbarGenerator(num, target, filled)
: Dynamically generates bars based on Pokémon stats parametersformatHeight(number)
,formatWeight(number)
: Helper functions that convert height and weight values from imperial to metric unitsremovePunctuation(text)
: Helper function that removes punctuation and spaces from the user inputdisplayError(errorText)
: Helper function that displays error messages on the page