Now that I've gotten the hang of using HTML and CSS, it was time to move forward with learning Javascript! For one of my first JS assignments, using the prompt statement for input and document.write for output, I created a temperature converter. To use this converter, a window would pop up asking the user to time in their own degrees in Fahrenheit, afterwards, the page would load showing that temperature in Fahrenheit, alongside the calculated version in Celsius degrees.
Temperature Converter
Working more with Javascript, I was given a .js file that would calculate the weight of a package and determine the delivery price. Using inputs and document.write, I had to make sure the prompt would allow a user to input their own weight of the package to successfully determine how much they would have to pay for shipping, and additionally add an error message if the user did not type in a number but letters instead.
Calculate your shipping cost here!
Now that I worked with HTML, CSS, and Javascript, it was time to combine all elements for a new assignment. Using the Body Mass Index (BMI) conversion, I created an input text box for measurements in feet, inches, and weight, then a button to calculate the BMI and to clear the page causing a function that would reset the measurements. Using variables, I was able to convert the weight dividing with the height and inches, and added some background design with the CSS.
Calculate your BMI here!