File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,10 @@ http.createServer(function (req, res) {
33
33
console . log ( 'requiredQueryString :' ) ;
34
34
console . log ( requiredQueryString ) ;
35
35
36
- //example spilt string
37
- var str = "/de/about" ;
38
- var path = str . split ( "/" ) ;
39
- console . log ( path ) ; // path = [ '', 'de', 'about' ]
40
- // path[1] = 'de', path[2] = 'about'
41
36
42
37
43
- var pathnames = parsedRouteUrl . pathname . split ( '/' ) ;
44
- var parametres = pathnames . filter ( n => n != '' ) ;
38
+ var pathnames = parsedRouteUrl . pathname . split ( '/' ) ; // ['','student','1']
39
+ var parametres = pathnames . filter ( n => n != '' ) ; // ['student','1']
45
40
console . log ( 'pathnames :' + pathnames ) ;
46
41
console . log ( 'parametres :' + parametres ) ;
47
42
Original file line number Diff line number Diff line change
1
+
2
+
3
+
4
+ //example spilt string
5
+ var str = "/de/about" ;
6
+ var path = str . split ( "/" ) ;
7
+ console . log ( path ) ; // path = [ '', 'de', 'about' ]
8
+ // path[1] = 'de', path[2] = 'about'
You can’t perform that action at this time.
0 commit comments