在回顾了几个月前起作用的代码之后,可以解释一下如何解决此错误吗?显示的错误表明“表达式类型在没有更多上下文的情况下是模棱两可的”。

var products = [("Kayak","A boat for one person","Watersports",275.0,10),
                ("Lifejacket","Protective and fashionable","Watersports",48.95,14),
                ("Soccer Ball","FIFA-approved size and weight","Soccer",19.5,32),
                ("Corner Flags","Give your playing field a professional touch","Soccer",34.95,1),
                ("Stadium","Flat-packed 35,000-seat stadium","Soccer",79500.0,4),
                ("Improve your brain efficiency by 75%","Chess",16.0,8),
                ("Unsteady Chair","Secretly give your opponent a disadvantage","Chess",29.95,3),
                ("Human Chess Board","A fun game for the family","Chess",75.0,2),
                ("Bling-Bling King","Gold-plated,diamon-studded King","Chess",1200.0,4)]

最佳答案

这行:
("Improve your brain efficiency by 75%","Chess",16.0,8),
只有2个字符串而不是3个字符串。 Activity 名称(?)似乎丢失了。

10-06 09:48