2017年11月7日 — var s = 'String'; var a = [1,2,3]; var o = {key: 'val'}; (s. ... constructor === String) && console.log('its a string'); (a. ... constructor === Array) && console. ... <看更多>
Generally, if the strings contain only ASCII characters, you use the === operator to check if they are equal. · When the strings contain characters that include ... ... <看更多>