I don’t understand what → = means (I thought it was greater than or equal to> =) and what is: (times and 1) below.
function repeat (string, times) {
var result = ''
while (times > 0) {
if (times & 1) result += string
times >>= 1
string += string
}
return result
}
source
share