### Current behavior
The current asynchronous login sample code has the following issues:
1. The `main` function tries to use `await userName()`, but `userName` is a string variable, not a function.
2. the `login` function should be called and `await` should be used to wait for its result.
### Expected behavior
The `main` function should correctly call the `login` function and use `await` to wait for the result, then print out the username.
### Sample code
Here is the corrected code:
```dart
Future<String> login() {
String userName = "Temidjoy";
return Future.delayed(
Duration(seconds: 4), () => userName
).
}
main() async {
print('Authenticating please wait...') The
String result = await login();
String result = await login(); print(result);
} f0da2a3397
* feat(docs): add Erlang cheat sheet
Create an Erlang备忘清单 in markdown format to document common commands and
operations for Erlang programming, including入门, 代码结构, 常用内置函数 (BIFs),
并发编程, 错误处理, 分布式编程, OTP框架, 和测试.
This cheat sheet aims to provide a quick reference for Erlang developers and
learners, summarizing key points and examples for various aspects of the
language.
* docs(erlang): update links and clean up markdown formatting
- Update Erlang documentation links. 70b561c710
Create a new cheat sheet for RxJS covering key concepts, operators, and methods. This includes installation, importing, creating Observables, and using various operators such as map, filter, switchMap, and more. The document also explains important concepts like Schedulers and provides examples for better understanding. 1013713630
Create an Erlang备忘清单 in markdown format to document common commands and
operations for Erlang programming, including入门, 代码结构, 常用内置函数 (BIFs),
并发编程, 错误处理, 分布式编程, OTP框架, 和测试.
This cheat sheet aims to provide a quick reference for Erlang developers and
learners, summarizing key points and examples for various aspects of the
language. 09fd8603cb