Question: Create a new HTML file named money _ converter.html . Inside the HTML file, set up the basic structure including the HTML , head, and

Create a new HTML file named money_converter.html. Inside the HTML file, set up the basic structure including the HTML, head, and body tags. Create a script tag within the body of the HTML document to write JavaScript code. Write a JavaScript function that takes two parameters: Currency Type (representing the selected currency option) and amount representing the amount in SAR to be converted). Inside this function, use a switch statement to determine the conversion rate based on the selected Currency Type. Define conversion rates for SAR to US Dollar, SAR to UAE Derham, and SAR to Chinese Yuan. o SAR to US Dollar: 1 SAR =0.27 USD O SAR to UAE Dirham: 1 SAR =1.03 AED o SAR to Chinese Yuan: 1 SAR =0.75 CNY Prompt the user to enter their currency choice using a dialog box. The options should be: o 1 for SAR to US Dollar o 2 for SAR to UAE Derham o 3 for SAR to Chinese Yuan

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!