Skip to content

ZouhirBensm/Counting_Scripts_From_Text

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

CountingScriptsFromText

This code calculates the percentages of presence of script names within a a string.

This project made me extremely familiar with higher order functions. I used several functions to iterate through each string character, determine what script name it corresponds to from its ranges property, count the occurence of each script type with the iteration process through the string, calculate the percentages of each script name within the string!

The code uses a source of data that has an array of objects data structure.

Comments were added, especially at the final function to better understand the process of calculations.

Project inspired by:

Haverbeke, Marijn. Eloquent JavaScript, 3rd Edition No Starch Press.

Running the program:

Step 0:

Download the source code. Make note of the path it was downloaded in.

Step 1:

Read the source code with the comments on GitHub, your favorite text editor or IDE!

Step 2:

If you are running mac os as I am, simply install node.js.

Step 3:

In terminal type: node /Users/username/Downloads/05_10.js

Step 4:

Look at the outputs and re-run the program to see that any input in the source code generates the right output on the console!

Thank you!

About

This code calculates the percentages of presence of script names within a a string.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages