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

  • 关于我们
  • 免责声明