As:C added console and alert to the conditional

As:C added console and alert to the conditional