JSFiddle - React, Tailwind, and code Playground

by Adam Jones

JavaScript

const str = 'helloeveryone';
  const chr = 'e';


function calculateDistance(testString, testChar) {
  
  //length = testString.length;
  
  testString.forEach(function(char) {
  document.body.innerHTML += "<li>" + char;
  
  });
  /*
  array1.forEach(function(element) {
  console.log(element);
});*/



}

window.onload(calculateDistance(str, chr));