폴리필1 [javascript] includes() 작동 안함 대부분의 브라우저가 includes()를 지원하지 않는다고 한다. 비교 객체가 String type이면 if( 객체.indexOf("stage1") > -1) {} 또는 polyfill을 사용 if (!String.prototype.includes) { String.prototype.includes = function() { 'use strict'; return String.prototype.indexOf.apply(this, arguments) !== -1; }; } 2020. 6. 10. 이전 1 다음