问题标签 [ipad-playgrounds]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
ios - 如何制作一个当我按下它时会打印单词的按钮
我想在 iPad 的 Swift Playground 中制作一个真心话大冒险游戏,但我无法制作一个按钮来打印多个敢于或真心话。我试图制作一个具有所有胆量的 var,然后将其放入(类 Responser NSObject)中,该 var 看起来像这样(vardares = ["dare1", "dare 2" ...]) 但它给了我错误说(无法将类型'[String]'的值分配给类型'String')和我尝试的第二件事是(让敢= [“敢1”,“敢2”...])给了我同样的错误. 我的代码看起来像这样