国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

? ? ????? JS ???? js? ???? ??????? ?? ???? ??(?? ??)

js? ???? ??????? ?? ???? ??(?? ??)

Jun 15, 2018 pm 03:49 PM
js

???? js? ???? ??????? ?? ???? ??(?? ??)? js? ???? ??????? ?? ??? ? ?? ??? ???? ?? ??????. ??? ?? ?????.

TypeError:?Cannot?read?property?'xxx'?of?undefined
TypeError:?Cannot?read?property?'xxx'?of?null
TypeError:?xxx.map?is?not?a?function

??? ?? ??? ???? ???, ??? ???? ?????? ???? ?? ? ????. ??? ??? ??? ???? ?? ???? ?????. ??? ??? ??? ??? ??? ??? ???? ????? ???? ?????

//?第一種做法肯定是這樣的
if(a){
??return?a.name?||?'你沒名字'
}
//?這種做法處理簡單的還能湊合用,但是如果你遇到這樣的呢?user.country.area.city.name,難道要這樣寫
if(user?&&?user.country?&&?user.country.area?&&?user.country.area.city){
??return?user.country.area.city.name?||?'你沒名字'
}
//?這是多么痛苦的一件事情?@后端兄弟
//?第二種,感謝es6
let?{country={area:{city:{name:'你沒名字'}}}}?=?user;
這個感覺也不是很好的解決方案
//?第三種,利用reduce構(gòu)建一個解析函數(shù)
function?getValue(obj,key){
??return?key.split('.').reduce(function(o,k){
????//?o,當前對象
????//?key,數(shù)組下一個元素
????if((typeof?o?===?'undefined'?||?o?===?null)){
??????return?k.indexOf('[array]')?!==?-1?[]:o
????}else{
??????return?k.indexOf('[array]')?!==?-1?(o[k.replace('[array]','')]||[]):o[k]
????}
??},obj)
}
let?user1;
let?user2?=?{
?
}
let?user3?=?{
?country:{
??area:{
???city:{
????name:'12312'
???}
??}
?}
}
let?user4?=?{
?country:[
??{
???city:{
????name:'12312'
???}
??}
?]
}
let?user5?=?{
?country:{
??city:[1,2,3]
?}
}
console.log(getValue(user1,'country.area.city.name'))
console.log(getValue(user2,'country.area.city.name'))
console.log(getValue(user3,'country.area.city.name'))
console.log(getValue(user5,'country.city[array]'))
console.log(getValue(user5,'country.city[array].1'))
console.log(getValue(user5,'country.city[array].10'))
console.log(getValue(user5,'country.city[array].1.name'))
console.log(getValue(user5,'country.city[array].persion[array]'))
//?輸出結(jié)果
undefined
undefined
"12312"
[1,?2,?3]
2
undefined
undefined
[]

? ??? ??? ??? ? ??? ??????? ?????. ? ???? ??? ??? PHP ??? ????? ?? ?? ??? ?????!

?? ??:

JS ??? ??? ??

webpack.config.js ???? ?? ????

? ??? js? ???? ??????? ?? ???? ??(?? ??)? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

??? ????
1600
29
PHP ????
1502
276
???
PHP? JS? ???? ?? ?? ??? ??? ?? PHP? JS? ???? ?? ?? ??? ??? ?? Dec 17, 2023 am 08:08 AM

PHP? JS? ???? ?? ?? ??? ??? ?? ?? ?? ??? ?? ???? ?? ???? ?? ?? ????? ??, ??, ??? ?? ???? ??? ???? ??? ?? ????? ??? ? ??? ?????. ??? ?? ??. ? ????? ?? ?? ??? ?? PHP ? JS? ???? ?? ?? ??? ??? ??? ?????. 1. ?? ???? ?? ?? ??? ???? ???. 1. PHP? ???? ?? 2. HTML5 ? Canvas? ???? ???? 3

?? ??: ??? JS ?? ?? ?? ?? ? ?? ???? ?? ??: ??? JS ?? ?? ?? ?? ? ?? ???? Apr 03, 2024 am 11:55 AM

?? ?? ? ?? ??? ?? ????? ???? ?? ???? ?????. ?? ?? ?? ???? ??? ?? ??? JS???. ? ??????? ?? ?? ? ??? ???? ?? ??? ?? ??? ?? ??? ??? ????. ???? ???? ?? ?? ? ??? ??? ?? ??? ?? ??? ?? ???? ??? ??? ????? ??? ????. ?? ??? ?? ???? ???? ?????. js? ???? ??? ?? ??? ???? ??? ?????? ??? ?? ??? ????? JavaScript, HTML, CSS, WebRTC ? ?? ????? ?? ? ??? ???? ???. ??? ?? ??? ?? ? ???? ??? ????? ???. ? ??? ????? ?? ??? ??? ????.

?? ??? ?? ?? ??: PHP ? JS? ???? ?? ??? ??? ??? ?????. ?? ??? ?? ?? ??: PHP ? JS? ???? ?? ??? ??? ??? ?????. Dec 17, 2023 pm 06:55 PM

?? ??? ?? ?? ??: PHP ? JS?? ?? ??? ??? ??? ?????. ???? ??? ??? ???? ?? ??? ?? ????? ??? ?? ? ??? ?????. ????? ???? ????? ?? ??? ???? ????? ??? ??? ?? ?????. PHP? JS? ???? ?? ??? ??? ??? ??? ???? ? ?? ??? ??? ? ??? ?? ?? ???? ??? ?? ? ????. ???? ??? ??? ???? ??? ???? ?? ?????. ??? ?????

JS ? Baidu Maps? ???? ?? ?? ??? ???? ?? JS ? Baidu Maps? ???? ?? ?? ??? ???? ?? Nov 21, 2023 am 10:00 AM

JS ? Baidu Map? ???? ?? ? ??? ???? ?? Baidu Map? ?? ??, ?? ?? ? ?? ??? ???? ?? ? ??? ?? ???? ?? ???? ?? ??? ??????. ? ???? JS? Baidu Map API? ???? ?? ?? ??? ???? ??? ???? ???? ?? ??? ?????. 1. ?? ??? ? API? ???? ?? ?? ??? ? ?? ???(http://lbsyun.baidu.com/)?? ??? ??? ???? ??????? ???? ???. ?? ??

JS ? Baidu Maps? ???? ?? ??? ??? ???? ?? JS ? Baidu Maps? ???? ?? ??? ??? ???? ?? Nov 21, 2023 am 09:33 AM

JS ? Baidu Maps? ???? ?? ? ?? ??? ???? ?? ??: ???? ??? ??? ??? ???? ??? ???? ?? ????? ?????. ??? ?? ??? ???? ??? ??? ?? ????? ???? ? ??? ? ? ????. ? ????? JS ? Baidu Map API? ???? ?? ??? ??? ???? ??? ???? ???? ?? ??? ?????. ?? ??: ???? ?? Baidu ??? ??, ?????? ??, ?? AP ?? ?? ??? ???? ???.

JS? Baidu Map? ???? ?? ?? ??? ?? ??? ???? ?? JS? Baidu Map? ???? ?? ?? ??? ?? ??? ???? ?? Nov 21, 2023 am 11:11 AM

JS ? Baidu Maps? ???? ?? ?? ??? ?? ??? ???? ?? ??: ? ????? ??? ?? ? ??? ??? ???? ?? ?? ??? ???? ?? ??? ????. ????? ?? ??? ??? ?? ???? ????? ???? ??? ?????. ? ???? JS? Baidu Map API? ???? ??? ?? ??? ?? ??? ???? ??? ???? ???? ?? ??? ?????. ??: Baidu Map API ?? ???? ?? ?? ??? ?? Baidu Map API ??? ??? ? ????.

PHP ? JS ?? ?: ?? ?? ?? ??? ?? ??? PHP ? JS ?? ?: ?? ?? ?? ??? ?? ??? Dec 18, 2023 pm 03:39 PM

??? ??? ??? ???? ?? ?? ??? ?? ? ?? ???? ??? ?????. ?? ???? ?? ??? ??? ?? ??? ???? ???? ?? ??? ??? ??? ? ??? ?? ????? ???? ??? ?? ?????. ? ????? PHP? JS? ?? ??? ???? ??? ?? ?? ??? ??? ??? ????? ???? ???? ?? ??? ?????. 1. ?? ?? ??? ?? ?? ?? ??? ??? ??? ???? ?? ?? ?? ??? ?????? ???? ???. ???? ??? ???? ??????.

js? vue? ?? js? vue? ?? Mar 11, 2024 pm 05:21 PM

js? vue? ??: 1. ? ??? ??? JS 2. ????? ???????? Vue.js? ?? 3. JS? Vue? ?? ???? ?? 4. JS? Vue? ?? ?? Vue.

See all articles