Created
August 29, 2022 22:35
-
-
Save AhmedMenaim/d2ca7a8a777a34324b4fbe5d1031d1f6 to your computer and use it in GitHub Desktop.
Menaim Academy - Swift Course - Vars, Constants & Data types - Int
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
//MARK: - Constants & Variables | |
let name = "Ahmed" | |
//name = "Mohamed" // Will give an error | |
var age = 25 | |
age = 26 | |
print(age) | |
// MARK: - Data Types | |
// 1- Int 2- Float 3- Double 4- String 5- Character 6- Bool | |
var newNumber: Int = 5 | |
var newName: String = "Mohammed" | |
let spaceCheck: Bool = false | |
// Int -> Unsigned, Signed | |
// Int -> Unsigned -> 5, 6 ,19 without + or - | |
//UInt32 , UInt64, UInt8, UInt16 | |
// Int -> signed -> -5, 6 ,-19 | |
//Int32 , Int64, Int8, Int16 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment