File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change 77 i = document . getElementById ( "i" ) . value . split ( "\n" )
88 code = document . getElementById ( "c" ) . value
99 while ( p < code . length ) {
10- if ( code [ p ] == "*" ) {
11- s . push ( i . shift ( ) )
12- } else if ( code [ p ] == "↓" ) {
13- out += s . pop ( )
14- } else if ( code [ p ] in num ) {
15- s . push ( Number ( code [ p ] ) )
16- } else if ( code [ p ] == "↑" ) {
17- out += "[" + s + "]"
18- } else if ( code [ p ] == "[" ) {
19- while ( code [ p ] !== "]" ) { p ++ }
20- } else if ( code [ p ] == "!" ) {
21- s . push ( fact ( s . pop ( ) ) )
10+ if ( code [ p ] == "*" ) { s . push ( i . shift ( ) )
11+ } else if ( code [ p ] == "↓" ) { out += s . pop ( )
12+ } else if ( code [ p ] in num ) { s . push ( Number ( code [ p ] ) )
13+ } else if ( code [ p ] == "↑" ) { out += "[" + s + "]"
14+ } else if ( code [ p ] == "[" ) { while ( code [ p ] !== "]" ) { p ++ }
15+ } else if ( code [ p ] == "!" ) { s . push ( fact ( s . pop ( ) ) )
2216 } ; p ++
2317 }
2418 //output the out variable
You can’t perform that action at this time.
0 commit comments