Func return | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Func return

func addTwoNumbers (_number1:Int , _number2:Int) -> Int { return number1 + number2 } let sum = addTwoNumbers (2,5) print (sum)

12th Nov 2022, 2:12 PM
Emmanuel Pena
3 Answers
+ 2
https://code.sololearn.com/c705x5YKqgkg/?ref=app you must put space between _ and variable name
12th Nov 2022, 3:36 PM
I am offline
I am offline - avatar
+ 1
Oh wow , thank you !!!
12th Nov 2022, 3:39 PM
Emmanuel Pena
0
Swift
12th Nov 2022, 2:48 PM
Emmanuel Pena