常用函式庫

取出亂數

1
val randomId = (1 .. 100).shuffled().first()

shuffled()傳回List,first()取出List中的第一個元素。

results matching ""

    No results matching ""