Function Practice

Easy

Write a javascript function the accepts an input from an inputbox and provides the length of the input.
Hint:Once you extract the input, use the .length property attached to the string.
Look here for more info.

Hard

Write a JavaScript function that accepts an argument and returns the type.
Hint: Using typeof you can get one of the six of the following: object, boolean, function, number, string, and undefined.
For this exercise, don't worry about object, function, or undefined. Just try to get the primitive data types of boolean, number, and string to return.
If you don't know how to use if statements, just make separate input boxes for each of the 3 primitive types.
Hint 2:You will need to use type casting.
You can read about type casting here.