<分区>
我有一些逻辑可以通过开/关来切换(with and else/if)true/false,但我想让它更简洁而不使用 switch 语句。理想情况下,if/else 将被转换成一小段内容。谢谢!!!
var properties = {};
var IsItMuted = scope.slideshow.isMuted();
if (IsItMuted === true) {
properties['Value'] = 'On';
} else {
properties['Value'] = 'Off';
}