File tree Expand file tree Collapse file tree 2 files changed +16
-14
lines changed Expand file tree Collapse file tree 2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change 1212
1313<!-- See create_labs.md for how to create your own lab! --> 
1414
15- <!-- Sample expected answer --> 
16- < script  id ="expected0 " type ="plain/text "> 
17-   query ( 'id' ) . isLength ( { max :50 } ) . matches (  / ^ [ A - Z 0 - 9 ] + $ /   ) , 
18- </ script > 
19- 
20- <!-- Full pattern of correct answer --> 
21- < script  id ="correct0 " type ="plain/text "> 
22- \s *  query  \(  ( 'id' | "id" | `id` )  \) 
23- \.  isLength  \(  \{  max : 50  , ? \}  \) 
24- \.  matches  \(  \/ \^\[A - Z0 - 9 \]\+\$\/ \)  ,  \s * 
25- </ script > 
26- 
27- 
2815</ head > 
2916< body > 
3017<!-- For GitHub Pages formatting: --> 
Original file line number Diff line number Diff line change @@ -71,5 +71,20 @@ info =
7171      present : String . raw `\[0-9[Aa]-[Zz]\]` , 
7272      text : "It's conventional to list letters first, so use [A-Z0-9] not [0-9A-Z]" 
7373    } 
74-   ] 
74+   ] , 
75+   expected : [ 
76+     "query('id').isLength({max:50}).matches( /^[A-Z0-9]+$/ )," , 
77+   ] , 
78+   correct : [ 
79+     String . raw `\s* query \( 
80+       ('id'|"id"|${ BACKQUOTE }  id${ BACKQUOTE }  ) \) 
81+       \. isLength \( \{ max: 50 ,? \} \) 
82+       \. matches \( \/\^\[A-Z0-9\]\+\$\/ \) , \s*` , 
83+   ] , 
84+   successes : [ 
85+     [  " query ( `id` ) . isLength( {max:50} ).matches( /^[A-Z0-9]+$/ ) , "  ] , 
86+   ] , 
87+   failures : [ 
88+     [  "query('id').isLength({max:50}).matches( /^[A-Z]+$/ )," ,  ] , 
89+   ] , 
7590} 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments