Please help me solve this code. I've been fixing this for a month. Thank you for helping!
function copyText(text) {
text.select();
try {
document.execCommand('copy');
} catch (err) {
console.log('Unable to copy' + err);
}
}
copyText('JS is love');