MCQs > IT & Programming > JavaScript > Performance-wise, which is the fastest way of repeating a string in JavaScript?

JavaScript MCQs

Performance-wise, which is the fastest way of repeating a string in JavaScript?

Answer

Correct Answer: String.prototype.repeat = function( num ) { return new Array( num + 1 ).join( this ); }

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it