• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/21

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

21 Cards in this Set

  • Front
  • Back

What are the new feature of swift?


  1. Type Inference
  2. Switch Statement Enhancements
  3. Tuples
  4. Closures(lambdas)
  5. Optionals
  6. Dictionary Type
  7. Array String and Dictionary Value Types
  8. Array Bounds Checking
  9. Class like struct and enum values
  10. Functions with multiple return values(via tuples)
  11. Generics
  12. Operator Overloading
  13. Overflow Checking in integer calculations
  14. String Interpolation
  15. Nested Types
  16. Nested Functions


Describe the type Inference feature in Swift.

Inferring the type of a variable by it value.

Describe the switch statement enhancements

Swifts switch statements can test values of any type

What are swifts access modifiers?


  1. public
  2. internal
  3. private

Describe the public access modifier.

A class that’s declared public can be reused in other apps

Describe the internal access modifier.

A class that's declared internal can only be used by code in the same project

Describe the private access modifier.

A class thats declared private can only be used in the file for wich it is defined.

What are swifts stored properties?

Stored properties are basically instance variables with getter and setters built in

How would you define a variable whose property is public but it can only be set by the file in wich it is defined

public private(set) var balance: Double = 0.0

Can initializers return values?

No

what is the shortcut for the quick help key

option + click on item

What is the shortcut for jump to Definition functionality

control + click on item

What is a value type?

A value-type constant’s or variable’s value is copied when it’s passed to or returned from a function or method, when it’s assigned to another variable or when it’s used to initialize a constant.

What is a reference type?

A constant or variable of a reference type (often called a reference) is said to refer to an object. Conceptually this means that the constant or variable stores the object’s location. Unlike Objective-C, C and C + +, though, that location is not the actual memory address of the object, rather it’s a handle that enables you to locate the object so you can interact with it.

Do objects assigned to constants make the objects constant?

No the contant just will always point to the same object

How do you compare reference types

=== and !===

what is this operator (...)

That is the closed range operator, creates a sequential collection. It is called closed because both ends have a discrete value. 10 ... 20

What are the patterns a case statement can include?


  • a single value or object of any type
  • a comma separated list of values
  • a closed range or half open range
  • Tuples
  • various combinations of these patterns in a comma separated list

Describe a while loop

a while loop continues till something is false

Desribe the do while loop

The do... while statement tests the loop-continuation condition after executing the loop’s body; therefore, the body always executes at least once.

What is the swifts global function stride?

stride(from: 11, through:1, by:-2)


From 11 to 1 iterating -2 down