I have a function that returns a tuple [number, number, number]
.(我有一个返回元组[number, number, number]
的函数。)
I want to use destructuring to assign to my class variables the values returned by the tuple like this:(我想使用解构将元组返回的值分配给我的类变量,如下所示:)
let [this.a, this.b, this.c] = functionThatReturnsTupleWithThreeNumbers()
but this doesn't work.(但这行不通。)
ask by kaki6876 translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…