I need help with recursion replacement

function

updateAllNames

(

string

,

oldPart

,

newPart

,


)

{

if

(

string

.

includes

(

oldPart

)

===

false

)

{

return

string

;

}

string

=

string

.

replace

(

oldPart

,

newPart

)

;

return

string

;

}

;

console

.

log

(

travelDocument

)

;

console

.

log

(

updateAllNames

(

travelDocument

,

‘grasshoper’

,

‘grasshopper’

)

)

;


Hey @Hidelberg_Martinez_E. Instead of typing it out, send us a screenshot and we can help you understand better. Thanks!
-Friidays :grin: