summary refs log blame commit diff
path: root/examples/5.src
blob: 88c171c96522afe48eee2ada388c0732c66f08fe (plain) (tree)
1
2
3
4
5
6
7
8
9
10



                                                       



                  

  
                  
                 
                  


                 
  
/* As you see, the language supports variable scopes */

let x = 18;

let foo = () => {
	let x = 1;
	print(x);
	return x;
};

let main = () => {
	print(x);
	let x = 2;
	foo();
	print(x);
	return x;
};