Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 559 Bytes

File metadata and controls

18 lines (14 loc) · 559 Bytes

[Java | Type]Script

Questions

  • When to use type vs when to use interface?

  • const vs let vs var

    const customer = X ? null : await this.concert.getCustomer(Y);

  • Ternary operation:

    • const variable_name = condition ? expression1 : expression2 is a shorthand way of writing an if-else statement
    • In English, this would be "if condition is true, assign variable_name the value of expression1. Else, assigne variable_name the value of expression2"
    • Example:
      const
      subnet-b2e38a9e