How to mimic the PHP ?? double question mark behaviour in Javascript?

前端 未结 0 635
忘了有多久
忘了有多久 2020-12-19 17:31
$client = [
  \'info\' => [
    \'company\' => \'Apple\',
  ]
];

echo $client[\'information\'][\'company\'] ?? \'N/A\'         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题