@BroCodez

// IF STATEMENTS = if a condition is true, execute some code
//                                   if not, do something else

const myText = document.getElementById("myText");
const mySubmit = document.getElementById("mySubmit");
const resultElement = document.getElementById("resultElement");
let age;

mySubmit.onclick = function(){

    age = myText.value;
    age = Number(age);
    
    if(age >= 100){
        resultElement.textContent = `You are TOO OLD to enter this site`;
    }
    else if(age == 0){
        resultElement.textContent = `You can't enter. You were just born.`
    }
    else if(age >= 18){
        resultElement.textContent = `You are old enough to enter this site`
    }
    else if(age < 0){
        resultElement.textContent = `Your age can't be below 0`;
    }
    else{
        resultElement.textContent = `You must be 18+ to enter this site`;
    }
}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My website</title>
    <link rel="stylesheet" href="style.css">
</head>
<body>
    <label>Enter your age:</label><br>
    <input type="text" id="myText"><br>
    <button type="submit" id="mySubmit">submit</button>
    <p id="resultElement"></p>
    <script src="index.js"></script>
</body>
</html>

@harrisonbanda8721

I was stuck learning js for months... watching so many tutorials but this playlist break me through...thanks so much

@Moon-xr9hr

Thank you dude, i 'm loving your videos, keep up the good work!

@DeadlyKnight04

This is where I am in school currently thank you so much bro…also you should play more games on 2nd channel

@MrPvssy

Daddy Brocode teaches me lots <3

@Gabriel-rg7cy

5:14 In Brazil you have to be at least 18 to have a license (sometimes 14 years old drive without license, but anyways)

@abdeSaves

bro casualy coding adult (18+) websites

@piotrmazgaj

<*> This is my seal. I have watched the entire video, understood it, and I can explain it in my own words, thus I have gained knowledge. This is my seal. <*>

@xzex2609

I did see his last js but unlike python I didn't follow along. the best way to follow along is that you create a minimal folder with three js html ,css files that are linked , use it as new project and drop one on the vscode icon and use OPERA floating window for the lessonns and you have your editors web page and in a small window bro , and try to do things ahead of him or at least don't copy and when the lessons done try to write it by yourself. some people find it hard to  setup three files and open a web page but this way it just tooks a drag and drop

@MindfulRepetitionVB

Thanks for the help! This stuff is hard to understand right now, but this made it easier.

@Xaviercomment586

bro please continue the react js series thank you!!

@Data_Falcon

in my country 18 years old to drive and i'm from India

@avazbek_usubjanoff

Thank you so much BroCode😊

@ying_yang_games

Happy to see you back. Keep on, chad

@helioobianchi

Thanks, bro. You're a real bro 💪

@NIKOLA72044

Very chill and informative, thank you :)

@xzex2609

Recently in Vs code I got a console in the terminal , and I dont need to use a browser for consol.log logging , I think node.js do this , and if the contents doesn't involve Html context there is no need to open a browser , just a terminal will do

@coolomar7804

I must be 18 years old to have a driving license in Egypt

@zodajam

In Sweden we start learning to drive at 16 but we get the license at 18

@cjlovesjesus4

1:07 I guess I can't enter my own site then 💀