fix clear functionality

clear() isn’t even a function for arrays in JS -_-