Skip to main content

types of datatypes in javascript || js course for beginners || codeandman (source code)

 hey guys how are you all today in this post I am going to give you the source code of my video called "types of datatypes of javascript" so let's begin:



here's the complete source code:-

// TYPES OF DATATYPES IN JAVASCRIPT
// Datatypes are the type of data in a programme
// Javascript has the following data types:
// * number
// * string
// * object
// * boolean
// * undefined

// NUMBER -> of two types
let num1 = 23; // this is a integer number -> number
let num2 = 23.43 // this is a float number -> number

// STRING -> can be written by two types
let str1 = "Like, Share and Subscribe"// this is a string written inside double quotes -> string
let str2 = 'Like, Share and Subscribe'// this is a string written inside single quotes -> string

// OBJECT -> is a key-value pair
let obj1 = {
    gautam: 99.9,
    pranav : 85
}
// BOOLEAN -> TRUE OR FALSE
let bool1 = true;
let bool2 = false;
console.log(obj1)

// UNDEFINED
let no;
console.log(typeof(num1));
console.log(typeof(str1));
console.log(typeof(obj1));
console.log(typeof(bool1));
console.log(typeof(no));

I hope that you liked this post.

Like, share and subscribe to my channel and this video.

Thank You.

Comments

Popular posts from this blog

How to create a Personal Portfolio website [source code]

  Hey guys how are you all today in this post I am going to give you the source code of my portfolio website’s part 1st video so let’s begin with this post:- Source code of Index.html file:- <DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Gautam Sharma</title> <link rel="stylesheet" href="../CSS-Files/style.css"> <link rel="stylesheet" href="../CSS-Files/utils.css"> </head> <body> <header> <nav> <li><a href="./index.html">Home</a></li> <li><a href="./Contact.html">Contact</a></li> <li><a href="./Haier.html"

Step by step guide to coding a game in Python

  How to Code a Simple Game in Python Python is a powerful and versatile programming language that can be used for a wide range of applications, including game development. In this tutorial, we will be creating a simple game using the Pygame library in Python. Pygame is a set of Python modules designed for writing video games. It provides functionality for creating 2D graphics, handling events, and playing sounds and music. By the end of this tutorial, you will have a basic understanding of how to create a game using Pygame and Python. Setting up the Development Environment Before we can start coding our game, we must set up our development environment. To do this, we will need to install Python and the Pygame library. If you already have Python installed on your machine, you can install Pygame by running the following command in your terminal: pip install pygame If you don't have Python installed, you can download the latest version from the official Python website. Once you have

How to write youtube channel description

Hey guys how are you all today in this post I am going to tell you that How to write youtube channel description . So if you want to know that how to write youtube channel description  then it is very easy there are simple tips for writing youtube channel description so now without any delay let's begin with this post:- watch the complete video here:-  https://youtu.be/CmZmozRmSFk   so guys if you want to write your channel description then you have to firstly learn that from where you have to edit your YouTube channel description. Firstly you have to open the YouTube Studio  website from there  you have to move to the customization tab. Now you have to go to the basic info option and from here youtube can edit your youtube channel description easily. How to write youtube channel description (Tips) In the first paragraph write a text which welcomes the viewer like the first paragraph of my post. In the second one write about your channel what you cover in that youtube channel etc.