Comments
Browse / Julia Cheatsheet
Julia Cheatsheet
A comprehensive cheat sheet for the Julia programming language, covering syntax, data types, control flow, functions, and more. Designed for quick reference and efficient learning.
Basics and Syntax
Basic Syntax
|
|
|
|
Variables |
|
|
Operators |
|
|
Line Endings |
Statements can be on the same line if separated by |
|
String literals |
|
|
String interpolation |
|
Data Types
|
Numeric Types: |
|
Boolean: |
|
String: |
|
Character: |
|
Arrays: |
|
Tuples: |
|
Dictionaries: |
|
Symbols: |
Control Flow
Conditional Statements
|
|
Loops
|
For Loop |
|
|
While Loop |
|
|
Break/Continue |
|
Exception Handling
|
|
|
Functions
Function Definition
|
|
Arguments
|
Positional Arguments |
Arguments passed in the order they are defined. |
|
Keyword Arguments |
|
|
Default Argument Values |
|
|
Varargs |
|
Return Values
|
|
|
Multiple return values using tuples:
|
Anonymous Functions
|
Arrays and Data Structures
Arrays
|
Creating Arrays |
|
|
Indexing |
Arrays are 1-indexed. |
|
Array Operations |
|
Dictionaries
|
Creating Dictionaries |
|
|
Accessing Values |
|
|
Adding/Updating Values |
|
|
Checking for Key |
|
Tuples
|
|
|
|
Tuples are immutable. |