Skip to content

Instantly share code, notes, and snippets.

@alketii
Created May 22, 2015 11:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alketii/7ebb497c088c52ab3773 to your computer and use it in GitHub Desktop.
Save alketii/7ebb497c088c52ab3773 to your computer and use it in GitHub Desktop.
Find the smallest number in an array
func minNumber(numbers):
var currentMin = numbers[0]
for number in numbers:
if currentMin > number:
currentMin = number
return currentMin
func _ready():
print(minNumber([5,2,3,4]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment