Project 24: Calendar UI
JS Wizard
Builds on these lessons
Step 1 of 3
Project
Clipboard API
Call navigator.clipboard.writeText(eventLink) inside an async function to copy an event's link. It returns a promise — await it, then log a confirmation once the copy genuinely succeeded (clipboard access can be denied by the browser, so this isn't guaranteed to work silently).
🎯 Your Task
Please add the exact code shown in the light gray box below to your editor.Do not delete your previous code, just insert these new lines in the correct place!
async function copyEventLink(eventLink) {
await navigator.clipboard.writeText(eventLink);
console.log("Copied:", eventLink);
}
copyEventLink("https://cal.example.com/e/123");