Skip to content

Instantly share code, notes, and snippets.

Michael Draper mikepc

Block or report user

Report or block mikepc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
mikepc / index.js
Last active Feb 22, 2018
Coding Challenge, buffer problem
View index.js
//Author: Michael Draper <>
//Justifies a string into a buffer.
// I ran it on Node v9.5.0 in ES2017 syntax.
const isInt = (n) => {
return n % 1 === 0;
//Example: justify('The quick brown fox jumps over the lazy dog', 52)
const justify = (str, len) => {
if(typeof(str) !== 'string'){
You can’t perform that action at this time.