6 kyu

Ho Ho Ho with Functions!

1,487 of 2,020BattleRattle

Description:

Santa is learning programming. And what could be the first program, he wants to write? Yes, the "Hello world!" of Christmas: "Ho Ho Ho!". He wants to write a function ho(), which should have the following return values:

ho(); // should return "Ho!"
ho(ho()); // should return "Ho Ho!"
ho(ho(ho())); // should return "Ho Ho Ho!"

Unfortunately he couldn't find any tutorial, which explains, how he could implement that. Can you help him?

Rules:

  • each call of ho() must add a "Ho" to the string
  • the "Ho"'s must be separated by a space
  • at the end of the string, there must be an exclamation mark (!), without a space
Algorithms

Stats:

CreatedDec 16, 2013
PublishedDec 16, 2013
Warriors Trained2869
Total Skips171
Total Code Submissions5578
Total Times Completed2020
JavaScript Completions1487
CoffeeScript Completions88
Ruby Completions478
Total Stars49
% of votes with a positive feedback rating92% of 227
Total "Very Satisfied" Votes194
Total "Somewhat Satisfied" Votes29
Total "Not Satisfied" Votes4
Total Rank Assessments8
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • BattleRattle Avatar
  • jhoffner Avatar
  • Voile Avatar
Ad