Midwest Dev Chat

MidwestDevChat.com

  • The newest 15 messages in the super-cool #javascript channel.

  • 09/13 14:50:43 Candra: face_with_monocle
  • 09/13 14:50:52 Elana: Javascript!
  • 09/14 00:28:31 Verda: finally i can stop typing
    [1,2,3][++i]
    ```
    and start writing
    ```
    [1,2,3]['postfix rulez',i++,i]
    
  • 09/14 15:03:39 Scott: https://medium.com/@Heydon/choosing-the-right-j...
  • 09/14 15:15:05 Sulema: lol chonky darts
  • 09/14 15:52:36 Sulema: I feel like I've already implemented all of these...
  • 09/17 19:51:28 Andrew: Yeah, I was just using "webpack" as a shorthand for some loader. And it was the dependent package was being compiled with `tsc` instead of `ngc`
  • 09/19 23:01:54 Verda: https://michelenasti.com/2018/09/19/Javascript-... the first example:
    function hello(name) {
      console.log(`How are you ${name}`);
    }
    
    hello`Michele`
    ```
    is kind of misleading.
    `name` is an array.
    
    Example 1:
    ```
    let slack = 'Midwest Dev Chat'
    
    function example(strings, val1, val2, val3) {
      console.log('strings:', strings); // [ "Hello, ", ". The numbers ", " and ", " are both prime." ]
      console.log('val1:', val1); // "Midwest Dev Chat"
      console.log('val2:', val2); // 373
      console.log('val2:', val2); // 383
    }
    
    example `Hello, ${slack}. The numbers ${373} and ${383} are both prime.`
    ```
    
    Example 2:
    ```
    let a=1,b=2,c=3;
    
    function example(strings, ...values) {
      console.log('strings:', strings); // [ "a = ", " | b = ", " | c = ", "" ]
      console.log('values:', values); // [ 1, 2, 3 ]
    }
    
    example`a = ${a} | b = ${b} | c = ${c}`
    ```
    
    I'm gonna start doing parameterless calls like
    ```
    gleamTheCube``
    ```
    
    or maybe
    ```
    gleamTheCube`(NaN);
    gleamTheCube (null);`
    
    troll
  • 09/19 23:26:07 Sulema: If you like clever uses of template tags, you'll love https://github.com/TehShrike/shell-tag
  • 09/20 08:25:52 Candra: isn’t a parentheses-less call basically what styled-components in react shows in all of their docs?
  • 09/20 08:34:13 Elaine: Yup! Tagged template literals is the practice/term
  • 09/20 08:36:04 Candra: that sounds much better than parentheses-less calls slightly_smiling_face
  • 09/20 08:44:06 Kathey: I can't even say "parentheses-less call"
  • 09/20 08:44:10 Kathey: I tried. It's not happening.
  • *Usernames have been changed to protect the innocent.
We're currently 1103 members strong. Join us!
Request Invite

Check out all the cool channels!

Join the conversation!