check if value is string in javascript code example Example: javascript check if var is string if (typeof a_string === 'string') { // this is a string }