I am new to internet computer. I wrote the following code on Visual Studio:
import Debug "mo:base/Debug";
actor DBank {
currentValue = 300;
currentValue :=100;
Debug.print(debug_show(currentValue));
}
I typed, dfx start, to start the server and got the message
May 29 02:03:07.969 INFO Starting server. Listening on http://127.0.0.1:8000/*
And then opened another terminal window and typed, dfx deploy. But the terminal with the server doesn't show the currentValue (of 100) as I expected.
It doesn't show your value due to the fact that canister can not be deployed as there are errors in your code.
You need to first declare your variable
currentValue
asmutable
and declare its type.For example you can try with this:
this should give you output: