Created
March 13, 2018 04:09
-
-
Save kaoru-fukusato/c54c160716d54e76d0bc712bad0342d9 to your computer and use it in GitHub Desktop.
コピペで学べるプログラミング基本2-3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"><!-- | |
myMes = new Array( // あいさつ文の設定 | |
"A HAPPY NEW YEAR!", | |
"謹賀新年", | |
"あけましておめでとうございます", | |
"今年もよろしくお願いします" | |
); | |
myRnd = Math.floor( Math.random() * myMes.length ); // 0~(myMes.length-1)の乱数を求める | |
document.write( myMes[myRnd] ); // あいさつ文を表示する | |
// --></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment