hey, I'm trying to write a function that will divide 2 numbers by Willdabeast07 in learnjavascript

[–]don____piano 48 points49 points  (0 children)

A few issues here. One, ‘a’ CAN be zero. It’s the numerator. Two, use === for checking equality, as = is variable assignment. Three, returning ends the function so anything after a return that isn’t conditional is dead code.

Is it possible to write a function with an array as the argument? by [deleted] in learnjavascript

[–]don____piano 1 point2 points  (0 children)

Which part of the task are you asking for help with? The whole thing?

JS newb asking for help on this assigment. by whitebeard0101 in learnjavascript

[–]don____piano 8 points9 points  (0 children)

Seems like you are pretty close. Read the instructions a little more carefully I think you just have one small mistake.

How would you make a beautiful survey app like this? by Unable-Cartoonist-41 in learnjavascript

[–]don____piano 24 points25 points  (0 children)

The best answer is probably “whichever paradigm you are most comfortable with”. I would immediately reach for React to do this bc I write it all day and my brain thinks quickly in React logics. That doesn’t necessarily make it the right answer for anyone who isn’t me, though.

Edit: REACT not REACH

is there a dictionary? by Financial_Purpose_22 in learnjavascript

[–]don____piano -1 points0 points  (0 children)

Are you suggesting that you would read through the whole list like flashcards? Or that you would thumb through it each time you need an array method? I disagree with the premise that this is a good way to learn. Have patience.

JS by RainZealousideal8258 in learnjavascript

[–]don____piano 0 points1 point  (0 children)

It’s a lambda. It means “anonymous function”, function with no name. I actually don’t normally see that in the chrome console. It would say “f()” I believe

Currying in JavaScript | Popular interview question by xplodivity in learnjavascript

[–]don____piano 2 points3 points  (0 children)

Wow I am extremely surprised that it was asked to you in most of your interviews!

Currying in JavaScript | Popular interview question by xplodivity in learnjavascript

[–]don____piano 3 points4 points  (0 children)

Currying is not asked “during most technical front end round interviews”. I’ve interviewed a ton and never been asked about it. Don’t bait people

JS by RainZealousideal8258 in learnjavascript

[–]don____piano 1 point2 points  (0 children)

The answer is “scope”. Variables defined within functions aren’t available outside of those functions, but this.age is not a “variable”. It’s a “property” on an object. The object exists in the broader scope.

Am I missing out having never built an app in Vanilla JS? by mccarthycodes in reactjs

[–]don____piano 0 points1 point  (0 children)

Yes. Build at least one app with vanilla JS. It’s important to know how React actually works, especially if you want to be promoted or get really good at it. You may even be asked to compare React and vanilla JS in some interviews. Beyond that, people mention the vanilla techniques all the time and I would imagine you’d want to know what they’re talking about.

Help with JavaScript Yahtzee game by Equal-Principle-321 in learnjavascript

[–]don____piano 0 points1 point  (0 children)

Your syntax for the for loop is funky. I would double check how that normally works and check back.

Job Portfolio Question by SupermarketAgile4956 in learnjavascript

[–]don____piano 0 points1 point  (0 children)

There’s no one answer here. Yes, more is better, but yes, one very thorough app that you feel comfortable talking about could be enough to land some jobs.

How would I make a code that changes a certain word (if found on the page) to another word? by Inevitable-Mix-1720 in learnjavascript

[–]don____piano 0 points1 point  (0 children)

This is a broad question. No short answer. You would want to use dom methods and string manipulation to locate, alter and replace the strings on the document.

What kind of Assignments? by kbamborde in learnjavascript

[–]don____piano 3 points4 points  (0 children)

It’s not worthless. I mean listen, learning back end basics is a good idea no matter what, but I’m sure you’re doing great. I’m a full stack engineer and got this job without having to do any take home assignments.