Tuples in typescript

Поделиться
HTML-код
  • Опубликовано: 10 дек 2024

Комментарии • 34

  • @HiteshCodeLab
    @HiteshCodeLab  2 года назад +4

    Learn full stack developer with live classes:
    hc.lco.dev/jscamp2

    • @akashpwl
      @akashpwl 2 года назад

      I know all this stuff, still i watch the full video, because it is fun to watch your video and the way you teach. 😊

  • @movingmelody3181
    @movingmelody3181 2 года назад +2

    You are the "Virat Kohli" of Coding Community.

  • @nobody20022
    @nobody20022 3 месяца назад

    Summary:
    Tuples: Define a fixed-length array where each element can have a different type.
    Usage: Useful for representing structured data where the order and types of elements are important (e.g., returning multiple values from a function).

  • @muthuvalli333
    @muthuvalli333 2 года назад +1

    SUPER topic HITESH SIR...😀😀😀

  • @aniksaha8108
    @aniksaha8108 6 месяцев назад +3

    Now the push is showing me error that => type 'boolean' is not assignable to parameter of type 'string | number' maybe that issue has been solved!

    • @UtkarshSharma-di7vo
      @UtkarshSharma-di7vo 2 месяца назад

      Yeah seems that they have fixed this issue now I am getting an error while using push and unshift

  • @chandanchiranjeebsahoo1507
    @chandanchiranjeebsahoo1507 2 года назад +1

    type User = [number,string]
    let usr1:User = [101,"chiranjeeb"]
    usr1.push(true)
    console.log(usr1)
    this is not allowing me to do push operations
    Error :- first.ts:12:11 - error TS2345: Argument of type 'boolean' is not assignable to parameter of type 'string | number'.

    • @mega123a
      @mega123a Год назад +1

      true is of type boolean which is neither a number nor a string. Please read the error carefully.

    • @diffcoder
      @diffcoder Год назад +1

      Yes, if you pass the number or string than only you will able to do array methods.

    • @vikasmv5952
      @vikasmv5952 Год назад

      Yes , even I watched video and there it's working fine even when I implemented it was showing same error.

    • @Alpha-nn8mn
      @Alpha-nn8mn Год назад

      that's actually good its preventing us from pushing beyond its limits.

  • @Kumar-bb9jb
    @Kumar-bb9jb 2 года назад

    Always Great to Learn From You Sir😊

  • @Vikas-dm9uc
    @Vikas-dm9uc 2 года назад

    Awesome ❤❤❤❤

  • @LaveshGarg
    @LaveshGarg 2 года назад

    Love you sir you are just amazing

  • @Vikas-dm9uc
    @Vikas-dm9uc 2 года назад

    I guess U have become bhrmastr of coders sir. Every warrior(coder) wanted n loves u bt wanted to keep u secret for future combat reasons.

  • @narutokunn
    @narutokunn 2 года назад

    Please share SO question link

  • @umadeviyelakurthy5873
    @umadeviyelakurthy5873 2 года назад

    Hi Sir, one query as we know array is group same datatypes, but now by declaring datatypes we are able to pass different datatype elements to same array.. please tell how it is?

    • @RahulGuptaa29
      @RahulGuptaa29 6 месяцев назад

      I think you should learn javascript first

  • @greenshaheen
    @greenshaheen 2 года назад

    nice explanation !

  • @amitgoyal8760
    @amitgoyal8760 Год назад

    We can fix that issues with tuples using readonly keyword but how tf I am gonna remember it everytime while creating applications 😭😭

  • @ankushladani496
    @ankushladani496 2 года назад

    Thank you sir....

  • @almairtaza3793
    @almairtaza3793 6 месяцев назад

    rgb stands for? in 6th line

    • @ZizouZ5
      @ZizouZ5 15 дней назад

      colors red-green-blue

  • @ankit21309
    @ankit21309 6 месяцев назад

    now the push is showing the error

  • @ckpioo
    @ckpioo 7 месяцев назад +1

    this is not what a "tuple" is, But ok nice clickbait

  • @arunjoshi7885
    @arunjoshi7885 2 года назад

    awesome

  • @asadanik5987
    @asadanik5987 2 года назад

    Nice 🥰🥰

  • @Priyanka-bd6um
    @Priyanka-bd6um Год назад

    Thank you :)

  • @SurinderKumar-m9d
    @SurinderKumar-m9d 4 месяца назад

    Hello sir can you please make this series in Hindi Language.

  • @Dev-Phantom
    @Dev-Phantom 3 месяца назад

    cool

  • @bishalnandi9633
    @bishalnandi9633 2 года назад

    ♥️♥️♥️

  • @anuraggupta1008
    @anuraggupta1008 5 месяцев назад

    day 2