Operators
Overview
Conditional & Logical Operators
:
Declares to property
=
Assign, to be
==
Equals to
===
Identical to
!===
Note identical to
!=
Not equal to
!
Not
>
Comparison - Greater then
<
Comparison - Less then
&&
And (Ampersand-Ampersand)
||
Or
? :
Ternary Conditional Operator => "expression ? true-value : false value"
?
Optional, there might not be anything
??
Nil-Coalescing Operator (Checks whether an optional contains a value or not)
$
Two-Way-Binding
\()
Parentezin içine hangi field 'ı istiyorsan onu yazıyorsun
...
up to and including
..<
up to but excluding
%
Remainder
->
Return
\
Quote "His best selling book is \"The Power of Habits\" for years"
Compound Assignment Operators
+=
Adds to itself
-=
Subtracts from itself
*=
Multiplies itself
/=
Divides itself
Unary Operators
+
Turns negative number into positive
-
Turns positive number inti negative
Other Operators
" " (quote)
String
""" """ (triple quote)
Multi-Line String
\n
Linebreak, New Textline
Optionals
when you define a variable as an Int you write "= Int"
But if you don't want to define it in advance you will add "?" sign to end of it like "= Int?"
Latter gives you a flexibility but the former
Sample Codes
Sources
Videos
Articles / Documents
Last updated