Home  >  Article  >  Backend Development  >  Front-end assembly string problem==

Front-end assembly string problem==

WBOY
WBOYOriginal
2016-09-20 03:30:05883browse

There is a push string loop. How to assemble alert into data in the exact same format as below? Single quotes and commas are all needed

<code>for(var i=0;i<res.data.length;i++)
                {       
                   
                }
</code>

['yellow', 'red', 'orange', 'green', 'blue', 'gray', 'black', 'white']

The front end is so bad

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn