diff --git a/Dart_Course/docs/GettingUserInput.md b/Dart_Course/docs/GettingUserInput.md index 0de6eeb..4bcae82 100644 --- a/Dart_Course/docs/GettingUserInput.md +++ b/Dart_Course/docs/GettingUserInput.md @@ -2,17 +2,18 @@ First we need to import a low level input-output library to get the basic I/O functions of Dart: -´´´javascript +```javascript import 'dart:io'; -´´´ +``` Following code snippet to explain the input functionaltiy of Dart: -´´´javascript +```javascript print("What is your name?"); String? username = stdin.readLineSync(); print("Hello ${username}!"); -´´´ +``` -´stdin´ is the standard input stream of dart. -´readLineSync()´ reads the line from the standard input. \ No newline at end of file +`stdin` is the standard input stream of dart. + +`readLineSync()` reads the line from the standard input.