#17: TypeScript Tuples🔥Mastering Data Structures| Best Practices & Examples

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ธ.ค. 2024

ความคิดเห็น • 42

  • @ThapaTechnical
    @ThapaTechnical  ปีที่แล้ว +1

    🚀 Checkout My new Website & Take the Assignment: thapatechnical.shop/courses/typescript-crash-course

    • @omrout3957
      @omrout3957 ปีที่แล้ว

      Sir I pay for react js source code ₹50 rs but I didn't get source code.Sir learn every day new thing in your video but you harassed me

  • @deepxsingh7
    @deepxsingh7 10 วันที่ผ่านมา

    great work sir 👍🚀

  • @maddeveloper6276
    @maddeveloper6276 ปีที่แล้ว +1

    isme jo ye [...data] hai console ke ander uska kya use hai ?

  • @BillaSaheb786
    @BillaSaheb786 ปีที่แล้ว

    great awesome...Please make video on ecommerce and job site using next 13

  • @arbu7075
    @arbu7075 ปีที่แล้ว

    Great Work❤

  • @raghua1726
    @raghua1726 ปีที่แล้ว

    why (person:PersonInfo)=>void have repeated twice in 8:54
    can anybody please explain me

    • @birajitnath1871
      @birajitnath1871 3 หลายเดือนก่อน

      first part is the function declaration type or declaration signature and 2nd part is the actual function. hope that should clear ur doubt

  • @ravikantjha9725
    @ravikantjha9725 ปีที่แล้ว

    please share the extension that you are using

  • @sahibdadsakhizada5563
    @sahibdadsakhizada5563 ปีที่แล้ว

    hello, sir I have got an error which (changed 1 package in 5s) couldn't install can you help what is issue ?

  • @runtimeerror7773
    @runtimeerror7773 ปีที่แล้ว +1

    Devknus for reactjs

    • @iaMac33
      @iaMac33 ปีที่แล้ว

      Yes bro this is best

  • @DhruvinS720
    @DhruvinS720 ปีที่แล้ว

    /* Question 3 */
    type WeatherData = readonly [string, number, string];
    let cities: any[] = [];
    let city1: WeatherData = ['Surat', 30, 'overcast'];
    let city2: WeatherData = ['Ahmedabad', 34, 'sunny'];
    let city3: WeatherData = ['Rajkot', 27, 'rainy'];
    cities.push(city1, city2, city3);
    const displayWeather = (cities: any[]) => {
    let cityInfo: object[] = [];
    cities.forEach((city) => {
    let [name, celsius, condition] = city;
    cityInfo.push({ City: name, Temperature: celsius, Condition: condition });
    });
    console.table(cityInfo);
    };
    displayWeather(cities);

  • @Radhe_radhe2929
    @Radhe_radhe2929 ปีที่แล้ว

    Op❤❤🎉

  • @Ahmad-ed8jr
    @Ahmad-ed8jr 10 หลายเดือนก่อน

    Need electron.js in 2024 course, plz ❤

  • @meshahan
    @meshahan 5 หลายเดือนก่อน

    Good Job but still you didn't explain how this auto type declaring the typescript on screen automatically

  • @NiteshKumar-l8t7m
    @NiteshKumar-l8t7m 4 หลายเดือนก่อน

    ...data give red underline ?

  • @nanditakumari9929
    @nanditakumari9929 ปีที่แล้ว

    First comment ❤

    • @ThapaTechnical
      @ThapaTechnical  ปีที่แล้ว +1

      Congratulations 🎊

    • @nanditakumari9929
      @nanditakumari9929 ปีที่แล้ว

      @@ThapaTechnical 🔥Your videos are just awesome 💯🔥 I love the video of javascript tutorial in 16 hours, For me javascript was never this much easy before watching your tutorial....U are the best guider for all of us in technical skills....❤️

  • @apurbadutta3253
    @apurbadutta3253 ปีที่แล้ว

    ❤️❤️ first view

  • @jaideeppal5853
    @jaideeppal5853 ปีที่แล้ว +1

    Firstview

  • @jagdishjena9058
    @jagdishjena9058 ปีที่แล้ว

    🅣🅗🅐🅝🅚 🅨🅞🅤 🅢🅞 🅜🅤🅒🅗 🅢🅘🅡.😚😚😚☺☺☺

  • @numericalwallah9174
    @numericalwallah9174 ปีที่แล้ว

    Enum for

  • @rishiraj2548
    @rishiraj2548 ปีที่แล้ว

    👍🙏

  • @saurabhkamble3211
    @saurabhkamble3211 ปีที่แล้ว

    Question 1:
    type ProductName = readonly [string, number, number]
    const disprod = (info:ProductName):void =>{
    const [prname, price, quantity] = info;
    console.log(`Product name: ${prname}, Price ${price}, Quantity ${quantity}`)
    }
    const prod1:ProductName = ["Soap",25,9]
    const prod2: ProductName= ["Hairbrush",89,21]
    disprod(prod1)
    disprod(prod2)
    Question 2:
    type SubjectGrade = [string, number, string, number, string, number]
    const average = (student:SubjectGrade):void =>
    {
    const [subname1, grade1, subname2, grade2, subname3, grade3] = student;
    console.log(`Subject name: ${subname1}, Grade: ${grade1},
    Subject name: ${subname2}, Grade: ${grade2},
    Subject name: ${subname3}, Grade: ${grade3}` )
    const vari = (grade1 + grade2 + grade3)/3;
    console.log("The average is:",vari.toFixed(2))
    }
    const sub1:SubjectGrade = ["Math",30, "EVS", 40 , "SSC", 70]
    average(sub1)
    Qusestion 3 :
    type WeatherData = readonly [string, number, string];
    let cities: any[] = [];
    let city1: WeatherData = ['Surat', 30, 'overcast'];
    let city2: WeatherData = ['Ahmedabad', 34, 'sunny'];
    let city3: WeatherData = ['Rajkot', 27, 'rainy'];
    cities.push(city1, city2, city3);
    const displayWeather = (cities: any[]) => {
    let cityInfo: object[] = [];
    cities.forEach((city) => {
    let [name, celsius, condition] = city;
    cityInfo.push({ City: name, Temperature: celsius, Condition: condition });
    });
    console.table(cityInfo);
    };
    displayWeather(cities)

  • @terabapaya556
    @terabapaya556 ปีที่แล้ว +2

    ye kitni gandi extension install ki hoi hy. ye extension bohat zeada confusion padaa kar rahii hy please isko remove karo Thapa Technical

  • @CrazyAshu34
    @CrazyAshu34 ปีที่แล้ว

    Dear Thapa bhai, I hope you don't mind, but I noticed that the organization of your React JS playlist could be improved. The serial numbers for the videos are not clear, and it's causing some difficulty for me to understand. On the other hand, 'Harry' bhai has done a great job with clear serial numbers for the videos. I hope you understand, and I apologize if my feedback comes across as critical. Thank you!

    • @omrout3957
      @omrout3957 ปีที่แล้ว

      Sir I pay for react js source code ₹50 rs but I didn't get source code.Sir learn every day new thing in your video but you harassed me

  • @anirbanchatterjee5942
    @anirbanchatterjee5942 ปีที่แล้ว +1

    Q3. Answer:
    type WeatherData = readonly [string, number, string]
    let allData:any[] = []
    const city1 = ['Kolkata', 35, 'Hot'];
    const city2 = ['Mumbai', 20, 'Moderate'];
    const city3 = ['Jammu', 12, 'Cold'];
    allData.push(city1);
    allData.push(city2);
    allData.push(city3);
    allData.map((ele, i)=>{
    console.log(`City: ${ele[0]}, Temp in C: ${ele[1]}, Condition: ${ele[2]}.`)
    })
    can you please tell me how to take user input in TS?

  • @DEEPANSHU_NAG
    @DEEPANSHU_NAG ปีที่แล้ว

    Ans 1.
    type ProductInfo = readonly [string, number, number];
    const displayProductInfo = (product:ProductInfo) => {
    const [name, price, quantity] = product;
    console.log(`The name of the product is ${name} price is ${price} and you ordered ${quantity} quantity`);
    }
    const product1:ProductInfo = ["Horlicks", 250, 10];
    const product2:ProductInfo = ["KitKat", 10 , 10];
    displayProductInfo(product1);
    displayProductInfo(product2);
    ---------------x---------------

  • @ballagtech7430
    @ballagtech7430 ปีที่แล้ว

    Q1
    type ProductsInfo = readonly [string, number, number, ]
    const product1:ProductsInfo = ['Smart Phone', 15000, 23];
    const product2:ProductsInfo = ['Watch', 100, 12];
    function displayProductInfo(product:ProductsInfo){
    const [Product_Name, price, stocks] = product
    console.log(`Product Name : ${Product_Name}, Price : ${price}, Stocks : ${stocks}`)
    }
    displayProductInfo(product1)
    displayProductInfo(product2)
    Q2
    type SubjectGrade = readonly [string, number, ]
    const subject1:SubjectGrade = ['Math', 95]
    const subject2:SubjectGrade = ['English', 85]
    const subject3:SubjectGrade = ['Science', 90]
    function calculateAverage(subject1:SubjectGrade, subject2:SubjectGrade, subject3:SubjectGrade){
    const[Subject1_Name, Grade1] = subject1
    const[Subject2_Name, Grade2] = subject2
    const[Subject3_Name, Grade3] = subject3
    const averageGrade = (Grade1+Grade2+Grade3)/3
    console.log(`Average Grade is ${averageGrade}`)
    }
    calculateAverage(subject1,subject2,subject3)
    Q3
    type WeatherData = [string, number, string]
    const city1:WeatherData = ['Patna',31, 'Haze'];
    function displayweather(city:WeatherData){
    const[city_name, tem, type] = city
    console.log(`Temperature in ${city_name} is ${tem}°C and Weather type is ${type}`)
    }
    displayweather(city1);