Tip Calculator in javascript
What you could do first is to separate out the logic that does the calculation from the logic that handles the UI. This makes it easier to update the math. Also, this makes the logic portable, should you scrap the UI code for something else, like if you move to use a framework.

Also, break up the logic to small functions that accept a predictable input. For instance, calculating shares is simply multiplying your inputs by your dividend - an array of input values and a number.

// In goes an array of hours and the dividend, out comes an array of shares
function getShares(hours, dividend){
  const sum = hours.reduce((c, v) =&gt; c + v);
  const rate = dividend / sum;
  const shares = hours.map(hour =&gt; hour * rate);
  return shares;
}


I also notice this strange E function which is just short for document.getElementById. There is document.querySelector and document.querySelectorAll that allows you to use CSS selectors to get a reference of your elements. Also, I'd avoid IDs since IDs should only appear once on the page. You can't use it for multiple elements of the same kind, for instance your inputs. Use classes instead.

For this case, I would tolerate the innerHTML usage. Otherwise, construct elements using document.createElement. Now to create repeated HTML, you can use array.map and array.join with template literals.

function renderResults(results){
  return results.map(result =&gt; `
    &lt;div class="result"&gt;${result.hours} x ${result.dividend} = ${result.share}&lt;/div&gt;
  `).join('');
}


For your HTML, while there are cases where the quotes on attributes are optional, it's best you put them in for consistency.