Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 1.33 KB

README.md

File metadata and controls

35 lines (24 loc) · 1.33 KB

JavaScript basic digit counter

🐣 Son: Mom, dad, help me! My homework says that I have to count the digits of these numbers:

1. 54465456456564564687489451231561322346 
2. 564171657562756175561574126742667452876275461524761572162765167515761578612761675156756156786154765716518576517561852182167821678628167827862787621871278216782561 
3. 87456571657562756345615741267426674528762754616756216276516751576157861271235678615476571651857635322167827862783243821654355615716518576517561852182167821678167515675615657165185763532216782786278324571651857635322167827834524571651857635322165466782786278324324234321234143223556769809876

👩🏿‍🤝‍👩🏻 Mom & dad: Good heavens!

🐥 Another son: don't worry, digit_counter will work this out!

Description

First version of a digit counter, made for practice purposes only ✌

Observations

Max length supported: 308

Only accepts integer numbers, not float

Examples

1. 345 -> 3 digits
2. -1001 -> 4 digits
3. 0 -> 1 digit
4. null -> 0 digits
5. a number with more than 308 digits -> 0 digits (FATAL! don't do this 😂)

How to use it

1. Clone or download this repo
2. Go to public_html and search 'index.html'
3. Double click
4. Have fun 🐱‍🏍

Made by Gonzalo Bensal 😁