is it possible to do something along the lines of this
Code: Select all
function run(String, function)
if String == "a" then
do function
end
end
and call that with:
Code: Select all
run("a", b())
Code: Select all
function run(String, function)
if String == "a" then
do function
end
end
Code: Select all
run("a", b())
Code: Select all
function run(s, func)
if s == 'a' then
func()
end
end
Code: Select all
run('a', function() end)
Code: Select all
function b() end
run('a', b)
Thank you <3ivan wrote:Not very elegant though, there may be simpler ways to implement what you are trying to do.
Users browsing this forum: Google [Bot] and 227 guests