×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
1
Language: Javascript
Posted by: null superset
Added: Sep 9, 2016 3:23 AM
Modified: Sep 9, 2016 3:25 AM
Views: 9
Return a string given an array of characters
  1. Array.prototype.toCharString = function () {
  2.   let a = this;
  3.   let s = '';
  4.  
  5.   a.forEach(function (char) {
  6.     s += char.toString();
  7.   });
  8.  
  9.   return s;
  10. };
  11.