how to create data attribute using javascript code example
Example: get data attribute javascript
// <div id="element" data-name="john"></div>
const el = document.querySelector('#element')
el.dataset.name // 'john'
// <div id="element" data-name="john"></div>
const el = document.querySelector('#element')
el.dataset.name // 'john'