Skip to content

Instantly share code, notes, and snippets.

@Andy-set-studio
Andy-set-studio / index.html
Created November 1, 2019 14:28
Button with visually hidden text
<button>
<span class="visually-hidden">Some text to announce</span>
<!-- your icon or whatever -->
</button>
@kerimdzhanov
kerimdzhanov / random.js
Last active April 20, 2024 03:21
JavaScript: get a random number from a specific range
/**
* Get a random floating point number between `min` and `max`.
*
* @param {number} min - min number
* @param {number} max - max number
* @return {number} a random floating point number
*/
function getRandomFloat(min, max) {
return Math.random() * (max - min) + min;
}