DEV Community

loading...

Discussion on: Daily Challenge #1 - String Peeler

Collapse
mellamoadan profile image
Adan ϟ

I'll start doing this challenges in Dart :D

import 'dart:io';

main() {
  stdout.writeln('Phrase?');
  String phrase = stdin.readLineSync();
  phrase.length > 2 ? print(phrase.substring(1, phrase.length - 1)) : print('Invalid Phrase');
}

Forem Open with the Forem app