Ternary Operator in JavaScript With Multiple Expressions?

后端 未结 6 1992
再見小時候
再見小時候 2021-01-17 14:29
the_styles ? the_styles.appendTo(\'head\'); the_styles=null : the_styles = $(\'.stylesheet\').detach();

Obviously, this isn\'t valid. Notice the \"

6条回答
  •  迷失自我
    2021-01-17 14:53

    the_styles=the_styles || $('.stylesheet').detach(); the_styles.appendTo('head');
    

提交回复
热议问题