7 kyu

Get the lost toString back

523 of 524BruceLee

Description:

There are some functions whose toString methods have been modified.

function foo() {}
foo.toString = function() {
  return 'blablabla';
};

Write a function _originalToString which takes a function as the argument, and returns a string which is as same as the argument's original toString's.

Note: You should not change the argument.

For example, the following statement should return function foo() {} instead of blablabla:

_originalToString(foo); // function foo() {}
Fundamentals

More By Author:

Check out these other kata created by BruceLee

Stats:

CreatedOct 11, 2015
PublishedOct 11, 2015
Warriors Trained1340
Total Skips59
Total Code Submissions3591
Total Times Completed524
JavaScript Completions523
Total Stars32
% of votes with a positive feedback rating78% of 110
Total "Very Satisfied" Votes77
Total "Somewhat Satisfied" Votes18
Total "Not Satisfied" Votes15
Ad
Contributors
  • BruceLee Avatar
  • ZozoFouchtra Avatar
  • ooflorent Avatar
  • Voile Avatar
  • farhanaditya Avatar
Ad