---
# System prepended metadata

title: Untitled

---

contract SolidityMapping {
  mapping(address => uint) public userBalances;
  
  constructor() {}
  
  function contribute() public payable {
    userBalances[msg.sender] += msg.value;
    // add user to separate arry
  }
  
  function findHighestBalance() public returns(address highest) {
    

  }
}
1 function foo() {
2   console.log(b);
3   if (true) {
4     let b = 3;
5   }
6   console.log(b);
7   var a = 4;
8 }
9
10 var a = 1;
11 let b = 2;
12 console.log(a);
13 foo();
14 console.log(a);


##### h5

let numArms = data["arms"] || 2;



1. if (!data["arms"]) {
2    let numArms = 2;
3  }
4  else {
5    let numArms = data["arms"];
6  }



// What is the difference between x, y, and z?
// and what are the different types?
x = []
y = {}
z = ()



1 s = [0, 1, 2, 3, 4]
2 print(s[-1])

