Created
April 28, 2016 02:21
-
-
Save camark/8800494a056ead0d00ac3c796fcf2647 to your computer and use it in GitHub Desktop.
自增id
This file contains hidden or 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
| 'use strict' | |
| function* next_ID(){ | |
| var current_id=0 | |
| var max=1000 | |
| while(current_id<max){ | |
| current_id++; | |
| yield current_id; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment