NEWS: Total Picture Views: 151536 | Total Article Views: 161055 | Top 5 Most Popular Article: 1. Am I Stuck Algorithm with Becker Robot | 2. PickUpThings with Becker Robot | 3. How to read a JSON and work with it | 4. Encrypted Data GUI (Download .Zip) | 5. Create Wall and Things with Becker

Basics Javascript

Description:

In this example I will be showing the basic in Javascript

Code:

       <html>
<head>
<script type="text/javascript">
    //Pop up message
    alert("Pop Up");
    
    //Message in the error log (F12)
    console.error("Error log (F12)");
    
    //Confirm pop up
    confirm("Are you sure you want to do that?");
    
    //Declare a variable
    var x = 2;
    
    // If statement
    // === only considers values equal that have the same type.
    // == tries to convert values of different types, before comparing like strict equality.
    if (x === 2){
        alert("X is equal to 2");
    }else{
        alert("X isn't equal to 2");
    }
</script>
</head>
<body>
</body>
</html>  
Attachments: None

Tags: Basic,if elseif else

Total Views: 1135

My name is Jean-Mathieu

I created this website so other people could enjoy finding useful stuff easier. If you have any question do not hesitate to contact me.

jean8mathieuCreated on 09/02/14 and updated on 09/03/14


affiliate_link

Disclosure: We are a website that needs compensation to operate like any other website on the internet.
We may receive consideration for our reviews but we are totally unbiased and do not accept paid reviews or fake reviews claiming to be something they are not.