What is Xcode?

Xcode is an Integrated Development Environment.

Meaning it has code editor, compiler, Debugger, and graphical user interface.

How to install xcode?

Xcode can be installed by downloading it from the Mac App Store.

What is a comment?

a comment documents functionality, provides instructions for coworkers and instructions for third party coders.

and example comment is //

What are constants?

What are variables?

A construct that holds on to or stores a piece of information.

2017-01-30_10-10-46

//: Playground – noun: a place where people can play

var str = “Hello, playground” //var is a reserved keyword construct for variable and str is the name of the variable string. The red letters enclosed in double quotes is the information or string that is stored in the str variable. the equals sign is the assignment operator.

str

str = “Hello, world”

//Declaring a variable

var number  = 10

number

//The keyword var is used to create a new variable;

//types of variables:  strings(str) and integers(int)

var language = “Swift”

language = “Objective-C”;

//What are constants? Constants are similar to variables as they too are used to store information. However, as their name states they remain constant which means their value cannot be changed.

let language2 = “Swift”;

//language2 = Russ

//Mutable means changeable. A var is a mutable type . Constants are immutable meaning its values cannot be changed.

//REPL

//Create a constant named favoriteDessert and assign to it a string containing your favorite dessert. Remember the syntax for a string is some text enclosed with two double quotes.

let favoriteDessert = “chocolate icecream”

//Naming Conventions

/*

Rule #1: Spaces not allowed

let programming language = “Objective-C”

*/

//CamelCase

/*

    Rule #2 use camel case.

    let programmingLanguage = “Objective-C

    let favoriteProgrammingLangauge = Swift.

*/

/*

Disallowed characters

Cannont start with a number

nO whitespace characters

no specail characters

no mathematical symbols

*/

//to use emoji as variables

//In Xcode

//

//Edit ->Emoji & Symbols.

 

CONTACT US

We're not around right now. But you can send us an email and we'll get back to you, asap.

Sending

©2020 RussellCoder

Log in with your credentials

or    

Forgot your details?

Create Account