gpt4 book ai didi

javascript - 在 JavaScript 中避免嵌套

转载 作者:行者123 更新时间:2023-12-04 09:42:37 27 4
gpt4 key购买 nike

<分区>

我需要检查 auth.runtime.status 是否等于 200,但是 auth.runtime 是不安全的,在 nodejs 中是否有更优雅的方法

    if (auth.runtime) {
if (auth.runtime.status == 200 && auth.application.status == 200)



...

}
}

有没有更好的写法?

让我们假设我有更多的嵌套如果

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com