eggheadio-github / stack-overflow-copy-paste

Utility functions copy/pasted (and modified slightly) from Stack Overflow
441 stars 606 forks source link

Add a function that truncates a string #164

Closed sosmaniac-FCC closed 6 years ago

sosmaniac-FCC commented 6 years ago

Thank you Kent for creating this tutorial environment. May I work on a function that truncates a string? Inspiration: https://stackoverflow.com/questions/1301512/truncate-a-string-straight-javascript Something along the lines of:

function (target, length) {
    // return the string parameter 'target' truncated by the amount of the integer parameter 'length'
}
kentcdodds commented 6 years ago

Sounds super! :+1: