lua roblox global variables

-- Step 1: Declare a global variable named "globalVar" and assign a value of 42 to it.
globalVar = 42

-- Step 2: Print the value of the global variable to the output console.
print(globalVar)

-- Step 3: Create a function named "modifyGlobalVar" that increments the value of the global variable by 10.
function modifyGlobalVar()
    globalVar = globalVar + 10
end

-- Step 4: Call the function to modify the value of the global variable.
modifyGlobalVar()

-- Step 5: Print the updated value of the global variable.
print(globalVar)