Javascript-code implementation

Source: Internet
Author: User
$ TianGanarray (& #039; A & #039;, & #039; B & #039;, & #039; C & #039;, & #039; ding & #039;, & #039; E & #039;, & #039; JI & #039;, & #039; Geng & #039;, & #039; xin & #039;, & #039; qu & #039;, & #039; & #039;); $ diZhiarray (& #039; sub & #039 ;, & #039; ugly & #039;, & #039; Yin & #039;, & #039; Mao & #039;, & #039; Chen & #039 ;, & #039; $ tianGan = array ('jia ',' B ', 'bing', 'ding', 'pente', 'ji', 'geng ', 'sin', 'taobao', 'dece ');
$ DiZhi = array ('sub', 'Ugly ', 'yin', 'mao ', 'chen', 'si ', 'wu', 'wei ', 'shen', 'uni', 'shanghai', 'hai ');
How to output the following results:
$ GZ = array (

'Jiazh', 'Ugly ', 'bingyin', 'ding Mao ', 'wuchen', 'already siz', 'geng Wu ', 'xin Wei', 'nonshen ', 'cid', 'A', 'yiha', 'bingzi', 'ding ug', 'wuyin ', 'taobao', 'gengchen', 'sinsi ', 'wu Wu ', 'wei Wei', 'jia shen', 'yi you', 'bing wei', 'ding hai', 'wuzi', 'oneself ug', 'geng Yin', 'xin Mao ', 'nonchen ', 'scant', 'noon tu', 'yiwei', 'bingshen', 'ding you', 'wuyun ', 'hai Hai', 'gengzi ', 'Ugly ', 'none', 'shimao', 'jiachen ', 'si si', 'wu Wu ', 'ding wei', 'wushen', '', 'geng taobao', 'xinhai', 'nonzi', 'shorge', 'jia ', 'yi Mao', 'bingchen ', 'ding si', 'wu Wu ', 'wei Wei ', 'geng shen', 'xin you', 'nonreta', 'hai Hai'

);
Is the so-called sixty-one child.

Reply content:

$ TianGan = array ('A', 'B', 'bing', 'ding', 'pente', 'ji ', 'geng', 'sin ', 'authorization', 'authorization ');
$ DiZhi = array ('sub', 'Ugly ', 'yin', 'mao ', 'chen', 'si ', 'wu', 'wei ', 'shen', 'uni', 'shanghai', 'hai ');
How to output the following results:
$ GZ = array (

'Jiazh', 'Ugly ', 'bingyin', 'ding Mao ', 'wuchen', 'already siz', 'geng Wu ', 'xin Wei', 'nonshen ', 'cid', 'A', 'yiha', 'bingzi', 'ding ug', 'wuyin ', 'taobao', 'gengchen', 'sinsi ', 'wu Wu ', 'wei Wei', 'jia shen', 'yi you', 'bing wei', 'ding hai', 'wuzi', 'oneself ug', 'geng Yin', 'xin Mao ', 'nonchen ', 'scant', 'noon tu', 'yiwei', 'bingshen', 'ding you', 'wuyun ', 'hai Hai', 'gengzi ', 'Ugly ', 'none', 'shimao', 'jiachen ', 'si si', 'wu Wu ', 'ding wei', 'wushen', '', 'geng taobao', 'xinhai', 'nonzi', 'shorge', 'jia ', 'yi Mao', 'bingchen ', 'ding si', 'wu Wu ', 'wei Wei ', 'geng shen', 'xin you', 'nonreta', 'hai Hai'

);
Is the so-called sixty-one child.

Var tianGan = ['A', 'B', 'bing', 'ding', 'pente', 'ji ', 'geng', 'sin', 'taobao ', 'shid'], diZhi = ['Z', 'Ugly ', 'yin', 'mao ', 'chen', 'si ', 'wu', 'wei ', 'shen', 'you', 'hangzhou', 'hai'], tianGanLength = tianGan. length, dizhiLength = diZhi. length, I = 0, j = 0, result = []; while (1) {var x = I % tianGanLength, y = j % dizhiLength; if (x = 0 & y = 0 & I) {break;} result. push (tianGan [x] + diZhi [y]); I ++; j ++ ;}

The code doesn't work anymore. The common method is to observe the law first. If it's inconvenient for me to look at the law, it can be converted into a number column. The example of observing the law is actually a ten-day cycle, six times, that is, a total of 60. each time the daily dry count and geographic support each + 1 judge that the total number exceeds their respective, return to the first, basically write this idea.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.