File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change 11import all from "chicagoNeighbourhoods" ;
22let i = 4 ;
3- const four = [ ] ;
3+ const sel = [ ] ;
4+ const getIndex = ( ) => {
5+ const random = Math . random ( ) * all . length
6+ return Math . floor ( random )
7+ }
8+
49while ( i -- ) {
5- let indexInList = Math . floor ( Math . random ( ) * all . length ) ;
6- four . push ( all [ indexInList ] ) ;
10+ sel . push ( all [ getIndex ( ) ] ) ;
711}
812
9- < h3 > What Chicago do you wish to visit tonight? </ h3 >
10- < ul > < li v-for = "a in four " > { { a } } </ li > < / u l >
13+ < h3 > Here are { { sel . length } } hoods </ h3 >
14+ < ul > < li v-for = "a in sel " > { { a } } </ li > < / u l >
Original file line number Diff line number Diff line change 1- let isChecked = true
1+ let show = true
22let today = new Date();
33
4- < input type ="checkbox " v-model ="isChecked ">
5- < date-picker v-if ="isChecked " :value ="today "/>
4+ < input type ="checkbox " v-model ="show ">
5+ < date-picker v-if ="show " :value ="today "/>
You can’t perform that action at this time.
0 commit comments