91
dror
10y

JS.... you know... For the kids..

Comments
  • 0
    Oh there is a js one too 😂, See this
    https://www.devrant.io/rants/386956
  • 18
    The random colors and the absent indentation make it really difficult to learn.
  • 1
    What color scheme is that, I want it.
  • 12
    Wait a minute... volume 3???
    The two previous books were selling well enough to convince them to go on?
  • 3
    [r,g,b] = '🍎🍏🐳'
    const apple = {r,g}
    const find = (my, it) => it in apple? 'eat '+apple[it] : my

    alert([...'rgb'].reduce(find,''))
  • 2
    @thejohnhoffer this will alert "eat 🍏” or "eat 🍎" based on whether the last letter in the test string is 'g' or 'r'. Yes, I've tested it in Chrome.
  • 0
    const find can't have line breaks, but I'd write it like this for "babies".

    [r,g,b] = '🍎🍏🐳'
    const apple = {r,g}
    const find = (my, it) =>
    it in apple? 'eat '+apple[it] : my

    alert([...'rgb'].reduce(find,''))
  • 0
    @thejohnhoffer Awsome 👍👍
  • 1
    DON'T USE ALERT!
  • 2
    @Aaronmacaron come on, you expect babies to look at the console :P

    At least I hope they suggest to run that code on the browser rather than node.js ;)
  • 3
    This book should be considered child abuse. Exposing kids to js!
  • 1
    @Aaronmacaron console.log for life!
  • 0
    kids.js ?
  • 0
    String comparison with '===' ? What are you teaching to your kids!?
  • 0
    @stacked I think this question is for the book publisher.
Add Comment