Practicing with Functions
Functions can either be predefined or created by a user. For example, the function 'strlen' counts all the characters within a string. including spaces.
Web Development is a fun time!
the length of the string above is: 30
Functions can also be created by a user to accomplish a specific task. For example, we can create a function that adds 2 numbers then divides by a third.
1 + 2 / 3 = 1.6666666666667
10000 + 4566 / 48 = 10095.125
25 + 0 / 100 = 25
be careful when using them, as the compiler will throw an error if any arguments are missing during the method call