KOSASIH / pi-nexus-autonomous-banking-network

Use $document instead of document JS-0555
Anti-pattern
Minor
3 occurrences in this check
You should use the $document service instead of the default document object
30document.getElementById('vote').addEventListener('input', () => {
31  const vote = parseFloat(document.getElementById('vote').value);
32  if (vote < 0) {
33    document34      .getElementById('vote')35      .setCustomValidity('Please enter a positive number.');
36  } else {
37    document.getElementById('vote').setCustomValidity('');
You should use the $document service instead of the default document object
 9    votes.reduce((a, b) => a + Math.pow(b - voteAverage, 2), 0) / voteCount,
10  );
11  document.getElementById('vote-count').innerHTML = `${voteCount} votes cast`;
12  document.getElementById('pi-value').innerHTML = `$${piValue}`;13  document.getElementById('vote-average').innerHTML =
14    `Average vote: $${voteAverage.toFixed(2)}`;
15  document.getElementById('vote-standard-deviation').innerHTML =
You should use the $document service instead of the default document object
 8  const voteStandardDeviation = Math.sqrt(
 9    votes.reduce((a, b) => a + Math.pow(b - voteAverage, 2), 0) / voteCount,
10  );
11  document.getElementById('vote-count').innerHTML = `${voteCount} votes cast`;12  document.getElementById('pi-value').innerHTML = `$${piValue}`;
13  document.getElementById('vote-average').innerHTML =
14    `Average vote: $${voteAverage.toFixed(2)}`;