Today i was asked question in interview. when i call 'hello'.replicate(3) it should print 'hellohellohello'
please help if anyone has answer to this
// 'hello'.replicate(3)
//output > 'hellohellohello'
function replicate(num){
for(i=0; i<3; i++){
}
}