im working on a game(snake) with obstacles, when the user get their score to 5 I create more blocks as obstacles:
wall = new Array(),
wall.push(new Rectangle(30, 50, 10, 10));
is there a clear/empty option in js, to delete the rectangles that i insert in the array i try with
rectangle=[];
but it didn't work.