var yellow = document.querySelectorAll('.yellow')
const minel = [...yellow].reduce((min, el) => +el.dataset.mount < +min.dataset.mount? el: min);
<div class='yellow' data-mount='3'></div> <div class='yellow' data-mount='1'></div> <div class='yellow' data-mount='2'></div> <script> const yellow = document.querySelectorAll('.yellow') const v = Math.min(...[...yellow].map(o => +o.dataset.mount)) alert(v) </script>