(input)
| 62 | |
| 63 | |
| 64 | function formatInput(input) { |
| 65 | if (input.search("e") != -1) { |
| 66 | let index = input.search("e"); |
| 67 | let x = input.substr(0, index); |
| 68 | let y = input.substr(index + 1,); |
| 69 | return Math.pow(parseFloat(x), parseFloat(y)); |
| 70 | } else { |
| 71 | return parseFloat(input); |
| 72 | } |
| 73 | |
| 74 | } |
| 75 | |
| 76 | |
| 77 | const quantites = document.getElementById('quantites'); |