摘要: function flipCoin(): "heads" | "tails" { if (Math.random() > 0.5) return "heads" return "tails" } function maybeGetUserInfo(): | ["error", Error] | [" 阅读全文
posted @ 2022-07-26 14:50 Zhentiw 阅读(37) 评论(0) 推荐(0) 编辑
摘要: 1. const values = [3, "14", [21]] for (let a in values) { // ^? } for (let b of values) { // ^? } . . . . Answer: for...in loop: The for...in statemen 阅读全文
posted @ 2022-07-26 14:24 Zhentiw 阅读(37) 评论(0) 推荐(0) 编辑