> For the complete documentation index, see [llms.txt](https://note.niefee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://note.niefee.com/summary/4/2016-nian-4-yue-6-ri.md).

# 2016年4月6日

\[TOC]

## 2016年4月6日

### javascript

每隔一个字母就变成大写。

```javascript
function (str){
        var len=str.length;
        var arr=[];
        var newStr="";
        var cc="";
        for(var i=0;i<len;i++){
            if(i%2==0){
                //str[i]=str[i].toUpperCase()
                cc+=newStr.concat(str[i].toUpperCase());
                //arr.push(str[i].toUpperCase());
            }else{
                //arr.push(str[i]);
                cc+=newStr.concat(str[i]);
            }
        }
        //strs=arr.join("");
        return cc;
    }
```
