Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
Try let a = 2 instead of let (a = 2)
Onome Sotu
@onomesotu
I know the let should go like this
{
    let a = 2;
    console.log(a);
}
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
so in complete:
let a = 2;
if (true) {
   console.log(a);
};
// or
let a = 2;
{
   let b = 3;
   console.log(a, b);
}
console.log(b);  // this will throw an error because b is not declared in this scope
Onome Sotu
@onomesotu
Ghost
@ghost~57b1df1e40f3a6eec05f92a8
didn't know that the second one without if actually works ^^
Onome Sotu
@onomesotu
@Otto-AA I understand all that :smile: I was just wondering if this was correct becuase it didn't work on the console
@Otto-AA Yes, it works without an If
Ghost
@ghost~57b1df1e40f3a6eec05f92a8

But, there's a problem. The let-statement form is not included in ES6. Neither does the official Traceur compiler accept that form of code.

I guess that's the reason it doesn't work

(also from your tutorial)
Onome Sotu
@onomesotu
@kbaig @Otto-AA thanks.. I checked but just wanted to make sure
CamperBot
@camperbot
onomesotu sends brownie points to @kbaig and @otto-aa :sparkles: :thumbsup: :sparkles:
:cookie: 478 | @kbaig |http://www.freecodecamp.org/kbaig
:cookie: 404 | @otto-aa |http://www.freecodecamp.org/otto-aa
Onome Sotu
@onomesotu
@Otto-AA I wonder why he commented print 2 instead of saying it would throw a syntax error
A-J Roos
@Asjas

@onomesotu Again, the guy continues to explain why it doesn't work and how to get it to work.
`
We have two options. We can format using ES6-valid syntax and a little sprinkle of code discipline:

But, tools are meant to solve our problems. So the other option is to write explicit let statement blocks, and let a tool convert them to valid, working code.

So, I built a tool called "let-er" [^note-let_er] to address just this issue. let-er is a build-step code transpiler, but its only task is to find let-statement forms and transpile them. It will leave alone any of the rest of your code, including any let-declarations. You can safely use let-er as the first ES6 transpiler step, and then pass your code through something like Traceur if necessary.
`

If you read what is actually in the book you'll get the answers in there
Onome Sotu
@onomesotu
@Asjas I got it in the end, but here I just think it's weird that he commented output of 2 in the code..instead of just saying syntax error..
let (a = 2) {
    console.log( a ); // 2
}
A-J Roos
@Asjas
Yeah I have it opened.
Onome Sotu
@onomesotu
ok good
@Asjas but thanks, I will read up on performance now :)
CamperBot
@camperbot
onomesotu sends brownie points to @asjas :sparkles: :thumbsup: :sparkles:
:cookie: 312 | @asjas |http://www.freecodecamp.org/asjas
A-J Roos
@Asjas
No i didn't mean performance. I meant read the entire part of Implicit vs Explicit Blocks. Top to bottom. The book gives the answers
Onome Sotu
@onomesotu
yeah.. found that out. thanks Use original ES6 syntax or trans-pile using let-er
Alan Price
@alanpaulprice
Hey guys, I was wondering if anyone could help me figure out why there is an extra, unwanted delay before my fade in animation is happening. It's on the keybinds info at the bottom of the page: https://alanpaulprice.github.io/metronome/
I have it set to a 1.5 second delay, but it should be fading in at the same time as the other info on the left
Tom
@moT01
@alanpaulprice 190-193 in the css
i think
Alan Price
@alanpaulprice
@moT01 i have both #keybinds-legend-keys and #keybinds-legend set to do the same animation, how come they're not acting identically? can you spot what i'm doing wrong?
Tom
@moT01
three `
Alan Price
@alanpaulprice
oops!
// ===== ANIMATIONS =====

#bpm-readout {
  animation: animateFade 1.5s ease-in both;
}

#keybinds-legend-keys, #keybinds-legend {
  animation: animateFade 1.5s 1.5s ease-in both;
}

@keyframes animateFade {
  0%{ opacity: 0 }
  100%{ opacity: 100% }
}

//=====

#wrapper {
  animation: descend 1.5s ease-out both;
}

@keyframes descend {
  0%{ margin-top: -1750px }
  75%{ margin-top: 25px }
  100%{ margin-top: 0 }
}
Tom
@moT01
you can edit or delete messages with the options at the right of the message - 3 little dots appear on hover
so i think what is happening after a short look - is that you have an animation on both the container and one of the items in the container
Alan Price
@alanpaulprice
thanks, it's deleted
Tom
@moT01
so the container comes in - then the item with the animation comes in 1.5 seconds after
Alan Price
@alanpaulprice
haha damn it, it's always something really dumb ..
@moT01 thank you!
CamperBot
@camperbot
alanpaulprice sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:cookie: 926 | @mot01 |http://www.freecodecamp.org/mot01
Tom
@moT01
well, try it
im not sure
Alan Price
@alanpaulprice
i have, it works the way i expected now :)
Tom
@moT01
cool
Alan Price
@alanpaulprice
thanks again mate
Onome Sotu
@onomesotu
Can anyone explain how to use 'normalize.scss' if installed via npm?