Jenis JavaScript Variabel Uji

if(typeof bar === 'string') {
   //whatever
}
CollectiveMind