0
배열을 내장 함수로 전달해야합니다. 예를 들면 다음과 같습니다.배열을 JavaScript에서 내장 함수 매개 변수로 전달
console.info('%cBlue text%c Red text', 'color:blue', 'color:red');
매개 변수가 3 개 있지만 매개 변수가있을 때 어떻게해야합니까?
var x = [ '%cBlue text%c Red text...%c nth-Text', 'color:blue', 'color:red', ... , 'nth-color:black'];
console.info.apply(null, x);
이 작동하지 않습니다. 미리 감사드립니다.
dystroy에게 감사드립니다. 아이디어를 얻었습니다. – gitGitGelme