My own attempt at JS