三目运算符

const x = 10;
const color = x > 10 ? 'red' : 'blue';
console.log(color);

  

posted @ 2025-07-11 16:33  华腾智算  阅读(7)  评论(0)    收藏  举报
https://damo.alibaba.com/ https://tianchi.aliyun.com/course?spm=5176.21206777.J_3941670930.5.87dc17c9BZNvLL