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

Top 3 Websites to get copyright free images in 2024 for free

Codes Post - Code And Man

Creating Landing Page Website - playlist - codeandman (source code)