6 kyu

Simple Sentences

1,531 of 3,642fizis

Description:

Implement a function, so it will produce a sentence out of the given parts.

Array of parts could contain:

  • words;
  • commas in the middle;
  • multiple periods at the end.

Sentence making rules:

  • there must always be a space between words;
  • there must not be a space between a comma and word on the left;
  • there must always be one and only one period at the end of a sentence.

Example:

makeSentence(['hello', ',', 'my', 'dear']) // returns 'hello, my dear.'
makeSentence ['hello', ',', 'my', 'dear'] # returns 'hello, my dear.'
make_sentence ['hello', ',', 'my', 'dear'] # returns 'hello, my dear.'
Strings
Regular Expressions
Fundamentals

Stats:

CreatedNov 28, 2013
PublishedNov 28, 2013
Warriors Trained6337
Total Skips952
Total Code Submissions34242
Total Times Completed3642
JavaScript Completions1531
CoffeeScript Completions140
Ruby Completions1022
Python Completions963
Clojure Completions12
Total Stars65
% of votes with a positive feedback rating90% of 479
Total "Very Satisfied" Votes396
Total "Somewhat Satisfied" Votes71
Total "Not Satisfied" Votes12
Ad
Contributors
  • fizis Avatar
  • baaart Avatar
  • rsa Avatar
  • albertogcmr Avatar
Ad