From 8f25020879ac3578aa9b26ffc20ce25a8c344f35 Mon Sep 17 00:00:00 2001 From: xworld2000 Date: Sun, 14 Jun 2020 08:04:01 -0400 Subject: [PATCH] added divide function --- index.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/index.html b/index.html index f5be48d..2ae9982 100644 --- a/index.html +++ b/index.html @@ -42,6 +42,11 @@ var numberTwo = parseFloat(document.forms.inputs.numberTwo.value); document.forms.inputs.result.value = numberOne * numberTwo; }, + divideNumbers: function () { + var numberOne = parseFloat(document.forms.inputs.numberOne.value); + var numberTwo = parseFloat(document.forms.inputs.numberTwo.value); + document.forms.inputs.result.value = numberOne / numberTwo; + }, } @@ -83,6 +88,8 @@

Xworld Elementary Calculator

onclick="calculator.subtractNumbers()">Subtract +