repeatChar in Node.js

Background Let us continue with our task of seeing how repeatChar is coded in various languages. In this post, we will use JavaScript. Specifically, NodeJS.   Code Outline Function:-repeatChar ( char ch, int numberofChars) Declare Variables buffer as an array ( var buffer = [] ) Validate Arguments ch Check if ch is a string … Continue reading repeatChar in Node.js