Converting certain values back and forth is often necessary when developing functions to help your website work the way you want it to. I needed a function that would convert…