if a in sting javascript code example Example: if string javascript if (typeof myVar === 'string') { /* code */ };