From 945967cdc712f39931e5ca9f1d29fa0d292357d1 Mon Sep 17 00:00:00 2001 From: Onoshko Dan Date: Fri, 30 May 2014 01:49:27 +0700 Subject: [PATCH] Fixes. --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index db71eb14..40fc077f 100644 --- a/README.md +++ b/README.md @@ -308,12 +308,12 @@ As in CoffeeScript, you can use `chained comprassions`: `inline switch` and `switch without expression`: String grade = switch { - when score < 60: 'F' - when score < 70: 'D' - when score < 80: 'C' - when score < 90: 'B' - default: 'A' - } + when score < 60: 'F'; + when score < 70: 'D'; + when score < 80: 'C'; + when score < 90: 'B'; + default: 'A'; + }; As you see, you can use keyword `when`, it's like `case`, but if the condition is satisfied, `switch` will `break`.