Kotlin Create Array Javascript Append Method Java