How to use Arrays and Sets in Swift | Swift Basics #13

Поділитися
Вставка
  • Опубліковано 12 чер 2024
  • Discover the power of arrays and sets in Swift with this comprehensive tutorial! Learn how to efficiently store and manipulate collections of data using arrays and sets. Understand the differences between these data structures and when to use each. Master essential array and set operations, such as adding, removing, and accessing elements. Start your journey to becoming a proficient Swift developer today and leverage the versatility and efficiency of arrays and sets in your code!
    🤙 WELCOME BACK 🤙
    WEBSITE: www.swiftful-thinking.com
    DISCORD: / discord
    GITHUB: github.com/SwiftfulThinking/
    SAY THANKS: www.buymeacoffee.com/nicksarno
    00:00 Arrays
    00:00 Intro
    02:37 Welcome back!
    03:42 Background
    05:09 Review: Tuples
    05:54 Review: Custom Types
    06:50 Arrays
    10:05 Working with Arrays
    10:33 Count
    11:08 First and Last
    12:33 Arrays are Value types
    14:43 Append
    15:54 Indexes
    17:56 First and Last Index
    18:50 Accessing items at an index
    21:02 Insert
    22:32 Remove
    23:58 Arrays with Custom Types
    25:07 Array vs Set
    26:16 Sets have unique values
    26:56 Sets are not ordered
    28:15 Wrapping up

КОМЕНТАРІ • 9

  • @charity4613
    @charity4613 11 місяців тому +4

    I'd love to see more tutorial series' where you create apps to completion. I find those to be the most helpful videos on your channel. Thanks for all you do!

  • @arunvasantharajan440
    @arunvasantharajan440 4 місяці тому

    please Add closures and generics and other complex topics as well, you are a great Teacher, Thank you Nick

    • @SwiftfulThinking
      @SwiftfulThinking  4 місяці тому +1

      Closures are in the Continued Learning playlist.
      These courses are in order, so you won’t need to use closures until then!

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

    🙏 thanks a lot, Nick

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

    Another great video as always! Happy 2024 !!

  • @Everyday-man
    @Everyday-man 4 місяці тому

    Can you use intersections to compare more than 2 things, such as console exclusives from PlayStation, Xbox and Nintendo Switch

  • @KevinCodeingology
    @KevinCodeingology 3 місяці тому

    I have a particular question: let's say you are trying to make a sort of gacha game, so you need various 3d models, and you also need the rarity (like common, rare, legendary ecc, which would be the droprate of those models when you try to get them)
    in this case, would arrays be the best choice to insert all the 3d models in? even tho there are like over 100 of them?
    And what about the rarities? Should you make a struct with the rarities variables or an enum is a better choice? or perhaps another array yet again?

  • @user-hn8np1mj6t
    @user-hn8np1mj6t 11 місяців тому

    💪

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

    ‘Index of range’ = nightmare … I don’t know how many times I had this crash