Basics for Julias
Julia basics cover the essentials of writing programs: variables, numeric types, strings, functions, conditionals and loops, plus the REPL and its package mode. This unit opens the Language stage and gives the vocabulary needed for later topics such as the type system, arrays and performance tuning.
Stage: Language · Part of the Julia roadmap · Last reviewed 19 November 2026
What to learn in Basics
- Use the Julia REPL, including help mode and package mode
- Work with Int64, Float64, Rational and Complex numbers and their promotion rules
- Define functions with the function keyword and the short assignment form
- Write for loops over ranges and while loops with break and continue
- Use string interpolation to build output text
Basics interview questions
Why does Julia start slowly the first time a function runs?
Julia compiles a method just in time for the argument types it is first called with. That first call includes compilation time, while later calls with the same types reuse the compiled code. This is why timing should use a second run or BenchmarkTools.
How does Julia indexing differ from Python?
Julia arrays are one-based, so the first element is a[1], and ranges include both ends, so a[1:3] gives three elements. Python is zero-based with exclusive end. The special keyword end refers to the last index.
Where Basics fits in the Julia roadmap
Basics belongs to the Language stage (beginner level), which takes about 20 hours. Core Julia.
Other units in this stage
Back to the full Julia roadmap