Playframework scala howto create temp variable
问题 Hi So I have a while loop: @for(i <- 0 until consoles.size) { ... Do something ... Add records to a column } But what I would like to add a variable and depending on what is going on add it to a different group. For example: @var column = 0; @for(i <- 0 until consoles.size) { @if(consoles[i].groupname != consoles[i - 1].groupname) { column = column + 1; } ... Do something ... Add records to a column } Is this possible. The only thing I have found is by passing in a variable and using that but