avatar
smore2014
0

Codes

3

Answers

Code compilers

Top answers

0
vs goto line
August-01-2022
CTRL + G
0
random color
August-01-2022
function getRandomColor() {
    const availableCharacters = '0123456789ABCDEF';
    const availableCharacterLength = availableCharacters.length;

    let color = '#';

    for (let i = 0; i < 6; i++) {
        color += availableCharacters[Math.floor(Math.random() * availableCharacterLength)];
    }

    return color;
}
0
detect fullscreen
August-01-2022
window.addEventListener('resize', (evt) => {
    if (window.innerHeight == screen.height) {
        console.log('FULL SCREEN');
    } else {
        console.log('NORMAL SCREEN');
    }
});