File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ func add_numbers ( a, b ) {
257257
258258Functions can not be retroactively assigned to variables. As such, the following is ** invalid** syntax:
259259```
260- let add_numbers = function ( a, b ) {
260+ let add_numbers = functi ( a, b ) {
261261
262262 let c = a + b;
263263 return c;
@@ -387,7 +387,7 @@ Similar to print, Input is a language defined input function. It allows for a pr
387387
388388The following is a valid input statement:
389389```
390- let a = input ( "Please enter your name: " )
390+ let a = input ( "Please enter your name: " );
391391```
392392
393393### Loops
@@ -404,10 +404,10 @@ loop ( a in range( 1, 100 ) ) {
404404
405405While loops are also possible:
406406```
407- let a = 1
407+ let a = 1;
408408loop ( while a < 100 ) {
409409 print ( a );
410- a = a + 1;
410+ a += 1;
411411}
412412```
413413
@@ -434,12 +434,12 @@ string ( x );
434434
435435You can also quickly get the type of a variable using the ` type() ` function:
436436```
437- x = 3
437+ let x = 3;
438438
439439# prints `Number`
440440print ( type ( x ) );
441441
442- string ( x );
442+ x = string ( x );
443443
444444# prints `String`
445445print ( type ( x ) );
@@ -450,7 +450,7 @@ You can also get the length of a list with `len()`:
450450let x = [ 1, 2, 3 ];
451451
452452# returns `2`
453- len( x );
453+ print ( len( x ) );
454454```
455455
456456### Importing functions
@@ -496,7 +496,7 @@ print_e();
496496Likewise, the following should print ` [e: 3, x: 5] `
497497```
498498let e = 3;
499- let list = [ e, x = 5 ];
499+ let list = [ e, x: 5 ];
500500e = 4;
501501print ( list );
502502```
You can’t perform that action at this time.
0 commit comments