Code Monkey home page Code Monkey logo

100daysofswift's Introduction

100 Days of Swift

This repository is to record my journey learning Swift programming with Hacking with Swift.

On the other hand, the README will be a place to show the summary of each day learnings.


Day 1 to 12 Summary

  • Day 1 (Variables, simple data types and string interpolation) – 27 July 2021

    1. You make variables using var and constants using let. It's preferable to use constants as often as possible.
    2. Strings start and end with double quotes, but if you want them to run across multiple lines you should use three sets of double quotes.
    3. Integers hold whole numbers, doubles hold fractional numbers and booleans hold true or false.
    4. String interpolation allows you to create strings from other variables and constants, placing their values inside your string.
    5. Swift uses type inference to assign each variable or constant a type, but you can provide explicit types if you want.
  • Day 2 (Complex Types) – 28 July 2021

    1. Arrays, sets, tuples, and dictionaries let you store a group of items under a single value. They each do this in different ways, so which you use depends on the behavior you want.
    2. Arrays store items in the order you add them, and you access them using numerical positions.
    3. Sets store items without any order, so you can’t access them using numerical positions.
    4. Tuples are fixed in size, and you can attach names to each of their items. You can read items using numerical positions or using your names.
    5. Dictionaries store items according to a key, and you can read items using those keys.
    6. Enums are a way of grouping related values so you can use them without spelling mistakes.
    7. You can attach raw values to enums so they can be created from integers or strings, or you can add associated values to store additional information about each case.

100daysofswift's People

Contributors

mofodox avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.