Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
値がDBから取得される変数がたくさんあります。それらは「true」または「false」のブール値です。「真」の値を保持するすべての変数を「はい」などの文字列値に変更し、「偽」の値を持つすべての変数を「いいえ」に変更する最も簡単な方法は何ですか?
for (var i=0; i<myArray.length; i++) { myArray[i] = myArray[i]? "yes" : "no"; }