Move object along y-axis in a loop

Hello! I’m doing a 2D game for the first time. I would like the red car to move from top to bottom repeatedly so that it looks like cars are passing through in the scene.

This is my current code for the car which makes it move downwards, but I don’t know how to loop it so that it goes back to the top once it reaches the bottom.

var CarMove = pc.createScript('carMove');

// initialize code called once per entity
CarMove.prototype.initialize = function() {
   this.entity.translateLocal(0, 0, 0);

// update code called every frame
CarMove.prototype.update = function(dt) {
    this.entity.translateLocal(0.0, -0.1, 0);


Here is the project editor for reference: PlayCanvas | HTML5 Game Engine

Thank you!