#can someone help me understand returning?
1 messages · Page 1 of 1 (latest)
Github copilot is best
whats that
I don't wanna use an ai to program for me
thats a lotta $
Its a free rendition of chat gpt etc, marking up word free
** You are now Level 2! **
returning as in function() .... return x end ??
This is a reading comprehension issue bru 😭
But all that return does it give is hault the code and gives you something
If I were to make a function to add two numbers together, I can make that function also return those numbers to me
local function add(x, y)
return x + y
end
print(add(1, 2)) --> prints 3
Why can’t I just do print x + y
In the function
Same thing
This may be the reason you might not be understanding return
@ripe sun did you read this?
1 sec
you meant 3 hours?
returning is kinda like referencing
returning is very useful in functions especially
I saw it