Core Data Type
Program Info
Program Code
×

Core Data Type

We declaring some variable with core data type.

Footer

×

Core Data Type

let num:number = 10;
let str:string = "hello";
let  isTrue:boolean = true;

Footer

Create an Object
Program Info
Program Code
×

Create an Object

We creating an object

Footer

×

Create an Object

type objType = {name:string,age:number,email:string};

const person:{name:string,age:number,email:string} = {
    name:"krishna",
    age:28,
    email:'krishna@gmail.com'
}

const user:objType = {
    name:"ganesh",
    age:25,
    email:'ganesh@gmail.com'
}

console.log(person.name)

Footer

Make Own Specific Data Type
Program Info
Program Code
×

Make Own Specific Data Type

We making own specific data type that is number data type.

Footer

×

Make Own Specific Data Type

let data:5 = 5;

Footer

Print Array With Different Data Type
Program Info
Program Code
×

Print Array With Different Data Type

We are printing array with different data type.

Footer

×

Print Array With Different Data Type

let arr:number[] = [32,6,23,879];
let arr2:string[] = ["java","php","node","python"];
let arr3:any[] = ["hello",123,true];
let arr4:[string,number,boolean] = ["hello",123,true];
let arr5 = ["hello",123,true];

arr2[2] = "angular";
arr2.push("Django");
console.log(arr);

Footer

Print Data of Number Data Type
Program Info
Program Code
×

Print Data of Number Data Type

We are printing data of number data type.

Footer

×

Print Data of Number Data Type

const num:number = 10;

console.log(num);

Footer

Print Sum of Two Number
Program Info
Program Code
×

Print Sum of Two Number

We are printing sum of two numbers.

Footer

×

Print Sum of Two Number

function add(a:number,b:number)
{
    return a+b;
}

let result = add(10,20);
console.warn(result)

Footer


×

Name : Krishna Verma    |    Father's Name : Mr. Satish Kumar    |    Email ID : krishnaverma28081997@gmail.com    |    Religion : Hindu    |    Address : Dayampur, kanker khera, Meerut Cantt (250001), UP    |    Date of Birth : 28 August 1997    |    Marital Status : Non-Married    |    Place of Birth : Dayampur Kanker Khera Meerut Cantt.    |    Gender : Male    |    Age : 28    |    Contact : 9520335394    |    Father's Occupation : Sports man    |    Mother's Name : Smt. Kuntesh Devi    |    Mother's Occupation : Homemaker    |    Number of Brothers : 1    |    Number of Sisters : 1    |    Current Residence : Dayampur kanker khera meerut cantt    |    Family Type : Nuclear Family    |    Family Name : verma    |    Height : 5' 6''    |    Weight : 70 kg    |    Complexion : Fair    |    Body Type : Athletic    |    Hair Color : Black    |    Health Status : Good    |    Any Physical Disability : No    |    Highest Qualification : B.Tech (CSE)    |    Master Skill : PHP Laravel    |    Total Projects : 40 +    |    Total Skills : 25 +    |    Languages Known : Hindi and English    |    Website : krishnaportfolio.in    |    Siblings : 3    |    Nationality : Indian    |    Total Experience : 5 Years    |    LinkedIn : https://www.linkedin.com/in/krishna-verma-840b71356/    |    Total Programs : 10000    |    Total Projects : 40    |    Total Skills : 25    |    Total Experience : 5    |    Total DSA Problems : 165    |    Total Served Companies : 2