2021-02-23js learning-variables, data types, strings

The main content of this study is: variables, data types, and some knowledge of string types.

problem:

  1. Variable naming convention (operation)?
  2. Can keywords be used in variable naming?
  3. What are the basic data types?
  4. What are the common bases? Representation methods? (Unfamiliar points)
  5. Infinity, -Infinity, NaN literally?
  6. What method is used to determine whether a data type is number type?
  7. What is the representation method of "" and" of a string?
  8. Common conversion character recognition: \n,\,\',\t,\b Function
  9. How to get the length of the string?
  10. What is the format of string concatenation?

Reply:

  1. Variable naming convention (operation)?
    a) Lowercase camel case rule.
  2. Can keywords be used in variable naming?
    a) No, an error will be reported.
  3. What are the basic data types?
    a) Numerical value, string, null, undefined, Boolean,
  4. What are the common bases? Representations? (Unfamiliar points)
    a) Decimal, octal, hexadecimal, binary
    b) Binary starts with 0b,
    c) Octal starts with 0, not with o.
    d) Hexadecimal Base starts with 0x
  5. Infinity, -Infinity, NaN literally?
    a) Infinity means positive infinity
    b) -Infinity means negative infinity
    c) NaN means Not a number
  6. What method is used to determine whether a data type is a number type?
    a) IsNaN() method.
  7. What is the representation method of "" and "of character string?
    a) Single and double interchange
  8. Common conversion character recognition:
    a) \n,\,\',\t,\b.
  9. How to get the length of
    a string? a) Length
  10. The format of string splicing?
    a) String +”+”, Note: The string must be placed in front.

Guess you like

Origin blog.csdn.net/weixin_44767679/article/details/113974433