const textToCopy = "npm install webdash";
const el = document.createElement("textarea");
el.textContent = textToCopy;
el.style.cssText = "position: absolute;left:-500%";
document.body.appendChild(el);
el.select();
document.execCommand("copy");
el.remove();