problem:
- How is the Boolean type + number type data operated?
- undefined+string result?
- Undefined+number, boolean result
- NuLL and string splicing results
- Null and numeric results?
- Null+Boolean result?
- What method is used to detect the data type?
- How to convert other data types to string types?
- Convert other types of data to digital?
- Convert other data types to boolean values?
- '' ,0,NaN,null,undefined What is converted into using Boolean()
Reply:
- How is the Boolean type + number type data calculated?
a) True is regarded as 1, false is regarded as 0 - undefined+string result?
a) It is equivalent to the splicing method of strings. - Undefined+number, boolean result?
a) NaN - NuLL and string splicing results
a) Null string - Null and number result?
a) Number - Null+Boolean result?
a) Convert the Boolean value to a numeric value. - What method is used to detect the data type?
a) Typeof - How to convert other data types to string types?
a) toString().
b) String()
c) String+'+' - Convert other types of data to numeric type?
a) ParseInt(String)
b) parseFloat(string)
c) Number()
d)-* / - Convert other data types to boolean values?
a) Boolean() - '' ,0,NaN,null,undefined What does Boolean() convert into?
a) False,
b) Everything else is true