Check in javascript