You want, typeofand possibly also isa:
julia> a = 2
2
julia> typeof(a)
Int64
julia> typeof("haha")
String
julia> typeof(typeof("haha"))
DataType
julia> typeof(Set([1,3,4]))
Set{Int64}
julia> 1 isa Number
true
julia> 1 isa String
false
julia> "1" isa Number
false
julia> "1" isa String
true
You can also use it @show
as a convenient way to print debugging information.
source
share