logo
  • 教程列表
  • SO官方文檔
  • Scala.js
    • Scala.js 中的 console.log
    • 胖箭頭函式
    • 簡單的類
    • 集合
    • 操作 DOM
    • 與 SBT 一起使用
  1. StackOverflow 文件
  2. Scala Language 教程
  3. Scala.js
  4. 集合

集合

Created: November-22, 2018

val personMap = Map(
  10 -> new Person("Roger", "Moore"),
  20 -> new Person("James", "Bond")
)
val names = for {
  (key, person) <- personMap
  if key > 15
} yield s"$key = ${person.firstName}"
  • 操作 DOM
  • 簡單的類

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明