Skip to content
Discussion options

You must be logged in to vote

The turtle API is only present on turtles, so you can just check for its presence.

if turtle then
  print("On a turtle")
else
  print("On something else")
end

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@CarelessBF
Comment options

Answer selected by CarelessBF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants