Draft

/* Strip my Comments */

185 of 401debri

Description:

Comments are the most important thing that developers use in their day to day work.

Now the question is that while displaying the code on the screen it should not display any comments.

For example:

stripIt("1 + /* 2 */3") => "1 + 3"
stripIt("var Foo = 1;// Foo declared") => "var Foo = 1;"
strip_it("1 + /* 2 */3") => "1 + 3"
strip_it("var Foo = 1;// Foo declared") => "var Foo = 1;"
strip_it("1 + /* 2 */3") => "1 + 3"
strip_it("var Foo = 1;// Foo declared") => "var Foo = 1;"

Write a function that takes a string and returns a string without whatever there is in the comment.

Note: comments can also be multiline and will always be presente in html format, ie: /* comment with starting and closing point */ or // comment up to the end of the line.

Logic
Strings
Algorithms

More By Author:

Check out these other kata created by debri

Stats:

CreatedJul 6, 2015
Warriors Trained1757
Total Skips458
Total Code Submissions4958
Total Times Completed401
JavaScript Completions185
Python Completions155
Ruby Completions73
Total Stars28
% of votes with a positive feedback rating92% of 161
Total "Very Satisfied" Votes139
Total "Somewhat Satisfied" Votes17
Total "Not Satisfied" Votes6
Total Rank Assessments172
Average Assessed Rank
6 kyu
Highest Assessed Rank
1 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • debri Avatar
  • myTerminal Avatar
  • GiacomoSorbi Avatar
  • MFreidank Avatar
  • Chrono79 Avatar
  • FArekkusu Avatar
Ad