READONLY and optional in typescript

Поділитися
Вставка
  • Опубліковано 10 січ 2025

КОМЕНТАРІ •

  • @soumyadipghosh6563
    @soumyadipghosh6563 Рік тому +2

    Welcoming 2024, with Hitesh Sir Videos!!!!
    Completed the js and react series, after this ts series will start your backend series!!!!
    You're a GEM sir!!! Loooooots of Love and Respect to you!!!!

  • @ankushladani496
    @ankushladani496 2 роки тому +9

    In case of array if we have to make array readonly then we have to use readonly 2 times
    for example:
    readonly scores : readonly numbers[]

  • @jaytillu8861
    @jaytillu8861 2 місяці тому +1

    Because _id is an array, we can modify the elements within the array (like adding or changing elements), but we can't reassign _id itself to a new array.

  • @priyojitsingha
    @priyojitsingha 6 місяців тому +3

    4:11 answer: If _id would be an array, we can push values into it

  • @PrabinManandhar-y5l
    @PrabinManandhar-y5l 6 місяців тому

    in case of arrays, we can still change the contents of the array because it is of reference type, ie, the variable holds the reference to the array and not the array values itself, so until the reference is the same we can do anything with the array.

  • @ofcljaved
    @ofcljaved Рік тому +2

    In case of readonly arrays we can't assign it another array but can push a value and even change the value by indexing. I did it and typescript didn't gave me any error

  • @someshpundir788
    @someshpundir788 11 місяців тому

    he said subscribe and the subscribe button just glowed up

  • @pratikbhujbal6915
    @pratikbhujbal6915 9 місяців тому +1

    in case in readonly we cannont assign new array to that array but we can push value in that array.

  • @ShubhamVsCode
    @ShubhamVsCode 2 роки тому +2

    Making progress with Hitesh Sir in Typescript 💖

    • @csstudent5001
      @csstudent5001 2 роки тому +1

      Sir can we create movable devices cluster in python plz reply me

  • @MessiLeo2312
    @MessiLeo2312 Рік тому +1

    4:14 NO

  • @pankajkumarsharma3182
    @pankajkumarsharma3182 Рік тому

    yes we can push the values to the array readonly property

  • @faizanahmed9304
    @faizanahmed9304 2 роки тому

    incase of arrays, if it is assigned readonly, we can't really push the elements into the array

  • @sanupdivakaran
    @sanupdivakaran 5 місяців тому

    Yes, we could push values to id array even in case of READONLY.

  • @HARSHKUMAR-g2d6u
    @HARSHKUMAR-g2d6u 3 місяці тому

    if id is array we can push the value in it regardless it readonly

  • @UtkarshSharma-di7vo
    @UtkarshSharma-di7vo 3 місяці тому

    4:13 Yes we can push values if the type of _id is array and we can replace a particular value as well

  • @yanshmoradiya
    @yanshmoradiya Рік тому +1

    great work

  • @AryanKeluskar-jw9ge
    @AryanKeluskar-jw9ge 7 місяців тому

    yes, we can push to a readonly array

  • @csstudent5001
    @csstudent5001 2 роки тому

    Hello sir! Sir can we create a moviable devices cluster in python.. sir plz reply me

  • @Dev-Phantom
    @Dev-Phantom 5 місяців тому

    great video thanks for sharing

  • @csstudent5001
    @csstudent5001 2 роки тому

    Sir I m doing research simulation in ns3 ....I need your help .can you help me

  • @abdulkhader3650
    @abdulkhader3650 2 роки тому

    I purchase your Course
    Not able to play on Ubuntu os

  • @MuhammadBilal-gf7ci
    @MuhammadBilal-gf7ci 2 роки тому

    I am already a subscriber.😉

  • @jalluchakri1528
    @jalluchakri1528 Рік тому

    Hello Sir I like this video sir and explanation also sir

  • @YouAndImpact
    @YouAndImpact 2 роки тому

    Great 👍

  • @anuraggupta1008
    @anuraggupta1008 6 місяців тому +1

    day 2

  • @Priyanka-bd6um
    @Priyanka-bd6um Рік тому

    Thank you 🧡

  • @abdulkhader3650
    @abdulkhader3650 2 роки тому

    Your support is not good
    I raised video play issue no reply yet

  • @ankushladani496
    @ankushladani496 2 роки тому

    Present Sir...

  • @Vikas-dm9uc
    @Vikas-dm9uc 2 роки тому

    ❤❤❤❤❤❤❤

  • @ankushladani496
    @ankushladani496 2 роки тому

    Sir give Homework like today's video So that we can have a habit of googling things and learn from self.

  • @shyamendrahazra
    @shyamendrahazra 2 роки тому

    Powered by A.I. 🤣🤣🤣