function copyToClipboard() {
const copyText = document.getElementById("myInput");
copyText.select();
document.execCommand("copy");
}
//new API
function copyToClipboard(){
navigator.clipboard.writeText(document.querySelector('#myInput').value)
}