我有类似于以下代码的内容:
_.each data, (value, type) ->
switch type
when "answered"
icon = "results_answered"
label = definitions.results.metrics.ta
when "leftblank"
icon = "results_lb"
label = definitions.results.metrics.tlb
when "standing"
icon = "results_standing"
label = definitions.results.metrics.cs
when "minimum"
icon = "results_min"
label = definitions.results.metrics.lowest
else
continue
metricLine = utilities.div("metricline")
metricLine.grab utilities.sprite(icon, "metric_icon")
metricLine.grab utilities.div("metriclabel", label + ":")
metricLine.grab utilities.div("metricvalue", value)
metricContainer.grab(metricLine)
metricContainer
但它会向我的浏览器抛出以下错误:
未捕获的 SyntaxError:非法的 continue 语句
是否可以在continue
不抛出错误的情况下包含我正在尝试的内容?