how to add values to array in kotlin code example Example: kotlin array val a: Array<Double> = arrayOf(3.0, 4.5, 8.0, 19.0)