JavaScript Tutorial For Beginners #10 – Logging to the Console




Hey ninjas, in this JavaScript lesson I’ll be showing you a couple of quick and easy ways to test your JavaScript code and variable values. These include the Console.log method, as well as the Document.write method.

You don’t need to worry too much about the Document and Console objects so much yet, as we’ll be covering objects and methods in more detail later in the playlist.

As always, any questions, ask away :).

SUBSCRIBE TO CHANNEL – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg?sub_confirmation=1

========== JavaScript for Beginners Playlist ==========

========== CSS for Beginners Playlist ==========

========== HTML for Beginners Playlist ==========

========== The Net Ninja ============

For more front-end development tutorials & to black-belt your coding skills, head over to – https://www.youtube.com/channel/UCW5YeuERMmlnqo4oq8vwUpg or http://thenetninja.co.uk

========== Social Links ==========

Twitter – @TheNetNinja – https://twitter.com/thenetninjauk

Original source


15 responses to “JavaScript Tutorial For Beginners #10 – Logging to the Console”

  1. Isn't typing the console.log() method redundant when you're already entering JavaScript in the console? For example, after assigning a value to myVar, all you have to do is type myVar and hit enter, and it will log the value of myVar to the console.

  2. in my code only document.write is working console.log is not working ???

    here is my code….

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title></title>

    </head>
    <body>

    <h1>fucking</h1>
    <p>hello madar chos</p>

    <script>
    var app = "vikky";
    document.write(app);
    </script>
    </body>
    </html>

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8">
    <title></title>

    </head>
    <body>

    <h1>fucking</h1>
    <p>hello madar chos</p>

    <script>
    var app = "vikky";
    console.log(app);
    </script>
    </body>
    </html>

Leave a Reply