how to select data property in js code example Example: how to select data attribute in javascript const link = document.querySelector('[data-link="1"]');