BaşlayınÜcretsiz Başlayın

Define a structure

Now that you've seen how we can use the struct keyword, let's create our own struct. In this scenario, you want to store the name, location, and age of our employees within our team. This is where a struct can come in handy, allowing us easy access to any of the values stored within the structure.

Remember that you can use the struct keyword to define a structure, as below.

struct struct_name
    <values>
end

Bu egzersiz

Intermediate Julia

kursunun bir parçasıdır
Kursu Görüntüle

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

# Define a structure called Employee with three variables
struct ____
    ____
    ____
    ____
end
Kodu Düzenle ve Çalıştır