배열에 함수를 삽입하려고했지만 null
으로 바뀝니다. 어떻게 될 수 있니?함수가 배열에 삽입되지 않았습니다.
this.over[name].push(typeof this[name])
this.over[name].push(this[name])
console.log(name, typeof this[name], JSON.stringify(this.over))
결과
on_key function {"on_key":["function",null]}
JSON으로 문자열을 지정하지 않고 개체 로깅을 시도해보십시오. 'console.log (this.over)'. 대부분의 콘솔은 각 속성과 값을 보거나 탐색 할 수 있도록 렌더링합니다. –