StackOverflow 文件 Scala Language 教程 Scala.js 集合 集合 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簡單的類