Discuss / JavaScript / ???的写法

???的写法

Topic source

乐意-昆明

#1 Created at ... [Delete] [Delete and Lock User]

???
写成如下
return x-y>0? 1: (x-y==0?0:-1)

Brush_house

#2 Created at ... [Delete] [Delete and Lock User]

直接就

return x-y;

不香吗(○` 3′○)


  • 1

Reply