实际上学习如何用scala编写代码,我需要一些帮助:
var json = [];
var length = 100000;
while(length--){
json.push({id: length, name: length});
}
var time = new Date().getTime();
var dropdown = document.createElement('select');
json.forEach(function(item){
var option = document.createElement('option');
option.innerHTML = item.name;
option.value = item.id;
dropdown.appendChild(option);
})
console.log(new Date().getTime() - time)
我收到了错误消息:
import play.api.libs.json._
case class Alert(email: String, query: String)
{
def main(args: Array[String]): Unit = { println("Hello from main of class")}
}
我不知道问题出在哪里,我更新了IntelliJ,甚至在build.sbt中添加了缺少的库依赖项
Alert.scala:2: error: not found: object play
import play.api.libs.json._
One error found