// var value = (code) ? block:block2// code == true 输出block// code == false 输出block2var a = (10>5)?'true':'false'console.log(a);