Code sample has incorrect logic

Issue Description:
The below code sample from Luau and C# Comparison is incorrect.

local example = "Example text"

do
	example ..= " changed!"
	print(example)  -- Outputs 'Example text changed!'
end

print(example)  -- Outputs 'Example text'

The sample states that the final print statement should print ‘Example Text’, but it actually prints ‘Example text changed!’.

Issue Area:
Documentation Content

Page URL:

3 Likes

Fixed! Are you still having issues?

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.