File tree Expand file tree Collapse file tree 2 files changed +8
-18
lines changed Expand file tree Collapse file tree 2 files changed +8
-18
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- const data = JSON . parse ( base64Decoded ) ;
18- </ script >
19- <!--
20- -->
21- < script id ="expected1 " type ="plain/text ">
22- if ( data . username && typeof data . username == 'string' && data . username . length < 20 ) {
23- </ script >
24-
25- <!-- Full pattern of correct answer -->
26- < script id ="correct0 " type ="plain/text ">
27- \s * const data = JSON \. parse \( base64Decoded \) \; \s *
28- </ script >
29- < script id ="correct1 " type ="plain/text ">
30- \s * if \( CONDALL \) \{ \s *
31- </ script >
32-
3315</ head >
3416< body >
3517<!-- For GitHub Pages formatting: -->
Original file line number Diff line number Diff line change @@ -104,6 +104,14 @@ info =
104104 ]
105105 }
106106 ] ,
107+ expected : [
108+ ' const data = JSON.parse(base64Decoded);' ,
109+ ` if (data.username && typeof data.username == 'string' && data.username.length < 20) {`
110+ ] ,
111+ correct : [
112+ String . raw `\s* const data = JSON \. parse \( base64Decoded \) \; \s*` ,
113+ String . raw `\s* if \( CONDALL \) \{ \s*`
114+ ] ,
107115 successes : [
108116 [
109117 "const data = JSON.parse(base64Decoded);" ,
You can’t perform that action at this time.
0 commit comments