Learning Kotlin – Part 6 – functions

This time we look at functions. Let’s take a simple function from Java: public int mult(int num1, int num2){ return num1 * num2; } In Kotlin it would look like this: fun mult(num1: Int, num2: Int): Int{ return num1 * num2 } A function definition always starts with the keyword fun. That’s fun isn’t it?…