mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-15 03:06:16 +02:00
Fix: console.log
is javascript grammer
This commit is contained in:
@@ -237,7 +237,7 @@ uint x[][5]; // arr with 5 dynamic array elements (opp order of most languages)
|
|||||||
// Dictionaries (any type to any other type)
|
// Dictionaries (any type to any other type)
|
||||||
mapping (string => uint) public balances;
|
mapping (string => uint) public balances;
|
||||||
balances["charles"] = 1;
|
balances["charles"] = 1;
|
||||||
console.log(balances["ada"]); // is 0, all non-set key values return zeroes
|
// balances["ada"] is 0, all non-set key values return zeroes
|
||||||
// 'public' allows following from another contract
|
// 'public' allows following from another contract
|
||||||
contractName.balances("charles"); // returns 1
|
contractName.balances("charles"); // returns 1
|
||||||
// 'public' created a getter (but not setter) like the following:
|
// 'public' created a getter (but not setter) like the following:
|
||||||
|
Reference in New Issue
Block a user