#6 JavaScript Tutorial | Variables & Data Types




In this video tutorial we will study and understand the concept of Variables & Data Types in JavaScript.
Variables –
Following are some basic definitions of variables in a typical programming language context.
A variable provides us with a named storage that our programs can manipulate. It is the basic unit of storage in a program.
Variables are used to store information to be referenced & manipulated in a computer program.
In programming, a variable is a value that can be changed depending on the conditions or information being passed to the program.

Data Types –
Datatypes are basically type of data that can be used and manipulated in a program. For e.g. numbers(1, 2, 5,5), string(“hello Simple Snippets”, “JS”), boolean(true, false) etc.

JavaScript provides different data types to hold different types of values. There are two types of data types in JavaScript.(as shown in the diagram above)
Primitive data type (string, number, boolean, null, undefined)
Non-primitive (reference) data type (objects, arrays)
For Program code, info & more resources checkout this article –

JavaScript Variables & Data Types


Video by – Tanmay Sakpal
Simple Snippets Channel link – https://www.youtube.com/simplesnippets

Original source


34 responses to “#6 JavaScript Tutorial | Variables & Data Types”

  1. If we use external js file and after that we write line like
    <script src="file location ">
    document.write("hello world");
    </script>
    My query is that my external file is running but the line that i write after that is not displayed.

  2. but why use document.write() for printing stuff instead of console.log() method. Also can't we just use the javascript coding part without the html part and see the output in the console?

  3. Ok It was nice Explanation. But I have one dought that I am showing here!!!

    <script>

    var num=34;

    var name="Mohit";

    document.write( "<b/>" + num);

    document.write("<br>");

    document.write(name);

    </script>

    output:
    34
    (in bold)
    Mohit(in bold)

    Why javascript showing Mohit in bold!! Run this code in your browser you will get it!! Thank you in Advance!!!

  4. Sorry sir in java tutorial I have discussing my doubts related to Python so plz forgive me
    Sir I m a CA student and want to learn VBA but like your video related to python now I m learning python with your video series but now I confused that python can make balance sheet or other financial report for me .
    Sorry once again sir due to write a big post sir plz make telegram group for asking a qus.

Leave a Reply