Discussion, Questions, and Resources for Part 1 (JavaScript - April 2018 Cohort)

TOPIC INFORMATION

See the full schedule for the April 2018 JavaScript Algorithms and Data Structures cohort.

This topic is for those of us who are participating in the April 2018 JavaScript Algorithms and Data Structures cohort. Even though this topic is mainly for those participating in the cohort, it’s totally ok for others to participate as desired. All are welcome! :national_park:

This topic covers the following sections of the fCC beta curriculum:

DEADLINE: 4/30/2018 11:59PM PST

RESOURCES

6 Likes

Members

@camper, @angelinalblyth, @ilkurtovi, @yoizfefisch, @NariRoh, @gilvarry, @emilio12345, @wmooney1984, @verde79, @Asjas, @kevin0110w, @bushbass

4 Likes

I would definitely say You Don’t Know JS and Eloquent JavaScript 3 are great overall resources to read whilst doing this Cohort as it handles a lot of how JavaScript works from the ground up which will help us all out.

6 Likes

I found JS for Cats to be a fun thing to go through. Doesnt take too long and if you like cats an added bonus :slight_smile:

Theres also -

Javascript Reserved words
30 Days Javascript Challenge
JS Exercism - havent used this yet but it was recommened in a blog post.
Codewars - I find this quite difficult still, even on the lower levels

3 Likes

I’ve found Colt Steele’s Web Developer Bootcamp course on udemy incredibly helpful while working through this stuff. He doesn’t really touch on any of the ES5/6 stuff, but the much lesser Advanced Web Developer Bootcamp that he teaches with a few other people does. I wouldn’t necessarily recommend the Advanced one, but the basic one is fantastic.

1 Like

I primarily use Udemy for most of my learning. I would recommend a couple courses for complete vanilla JavaScript learning.

Make sure you google “Udemy coupons” to get these at a discounted rate. usually $10-15 USD each.

w3schools is a classic https://www.w3schools.com/js/default.asp

I also enjoy sololearn.com, it covers many languages and the app I find is it’s strongest point, bite sized lessons you can do while waiting for the bus, plus code editor and my fav challenging other players to 5 rounds of questions

1 Like

Similar to codewars, there’s hackerrank.com and a juicy bit of info I found out the other week, many companies use it during the interviewing process for the technical interview, in this particular case it was Skyscanner, but having practiced on the platform(and the timed practice challenge they’d put up) put people at a huge advantage

2 Likes

Check Coursopedia a lot of java courses from different providers are listed. Might be of help!!)

Great resources so far! :sunny: Since this topic will be used for the next 22 days and potentially many more resources will be shared and replies created, you all may want to add your links to the first post above so they’re easier to find. It’s not totally necessary, though, since Discourse has a nice way of listing all of the links in the topic:

Screenshot

That said, your links may be easier for future visitors to find if they’re listed in the first post above, but it’s not necessary.

In terms of JavaScript and something I noticed while going through the curriculum today …

In the Basic JavaScript: Finding a Remainder in JavaScript, there’s a note about the remainder operator:

Note
The remainder operator is sometimes incorrectly referred to as the “modulus” operator. It is very similar to modulus, but does not work properly with negative numbers.

I didn’t know it wasn’t a true modulo in JavaScript as I’m used to calling the % operator the modulo operator and assuming it works that way. MDN confirms this:

Remainder (%)

The remainder operator returns the remainder left over when one operand is divided by a second operand. It always takes the sign of the dividend, not the divisor. It uses a built-in modulo function to produce the result, which is the integer remainder of dividing var1 by var2 — for example — var1 modulo var2. There is a proposal to get an actual modulo operator in a future version of ECMAScript, the difference being that the modulo operator result would take the sign of the divisor, not the dividend.

Wikipedia’s Common Pitfalls of the Modulo Operation section shows an example of what to look out for when using JavaScript’s remainder operator (%).

2 Likes

W3schools is an oldie but a goodie. I still prefer paper books. I use Jon Duckett’s HTML& CSS/ JavaScript and jQuery as reference books. There is also Shay Howe’s online book Learn HTML & CSS (https://learn.shayhowe.com/html-css/).

1 Like

I just added this to the the top of the page as well, but I found this free Udemy class on ES6 to be helpful and very well done.
https://www.udemy.com/essentials-in-javascript-es6/

In the Basic JavaScript: Global Scope and Functions challenge, it states:

Variables which are used without the var keyword are automatically created in the global scope. This can create unintended consequences elsewhere in your code or when running a function again. You should always declare your variables with var.

Curious to learn more about this, I looked it up on MDN and found the following points in relation to declared and undeclared variables:

  1. Declared variables are constrained in the execution context in which they are declared. Undeclared variables are always global.

  2. Declared variables are created before any code is executed. Undeclared variables do not exist until the code assigning to them is executed.

  3. Declared variables are a non-configurable property of their execution context (function or global). Undeclared variables are configurable (e.g. can be deleted).

That section ends with:

Because of these three differences, failure to declare variables will very likely lead to unexpected results. Thus it is recommended to always declare variables, regardless of whether they are in a function or global scope.

Take a look at the MDN Var page for more interesting information about the different ways one can declare variables.

In Basic JavaScript: Comparison with the Equality Operator, Basic JavaScript: Comparison with the Strict Equality Operator and Basic JavaScript: Practice comparing different values challenges, we learn about the equality operator (==) and the strict equality operator (===). Basically, the difference between the two is:

  • == will compare for equality after doing any necessary type conversions
  • === will not do the conversion, so if two values are not the same type === will simply return false

Not surprisingly, there’s a StackOverflow discussion about which of the equality operators to use and when. Generally, it’s probably better in most cases to use the strict equality operator (===) and strict inequality operator (!==).

Also, I found some JavaScript linting tools JSHint, JSLint, and ESLint. These or something like them are probably built into your editor, but in case they’re not, one can paste one’s JavaScript code into these tools and check for errors. I added them to the first post for future reference.

1 Like

How do I become active in the live discussion/cohort? I am not sure I see that option. Am I too late to jump in?
I am wrapping up my full-time work this week so that I can fully immerse myself. Is there a way that I can backtrack and review what I have missed?

Please let me know. I have been working through another prep course and I was really looking forward to following this along with everyone.

Thank you for your help with this!

I look forward to getting into the thick of it all!

Melissa Boyd
melissa.boyd@att.net

First, a quick poll:

How far along in the beta curriculum are you as of April 14, 2018?

  • Have not started yet
  • Working on Basic Javascript
  • Completed Basic Javascript
  • Completed ES6
  • Completed Basic Regular Expressions
  • Completed Basic Debugging
  • Completed Basic Basic Data Structures
0 voters

Observation about Radix (parseInt)

For Basic JavaScript: Use the parseInt Function with a Radix, I was not familiar with the term radix, so I did a little more research so I can fully understand the parseInt function.

According to MDN’s parseInt() page, one should always specify a radix, usually 10:

radix
An integer between 2 and 36 that represents the radix (the base in mathematical numeral systems) of the above mentioned string. Specify 10 for the decimal numeral system commonly used by humans. Always specify this parameter to eliminate reader confusion and to guarantee predictable behavior. Different implementations produce different results when a radix is not specified, usually defaulting the value to 10.

So, what’s radix and why would we want to use anything other than 10?

According to Wikipedia’s Radix entry:

In mathematical numeral systems, the radix or base is the number of unique digits, including zero, used to represent numbers in a positional numeral system. For example, for the decimal system (the most common system in use today) the radix is ten, because it uses the ten digits from 0 through 9.

Turns out, according to Wikipedia’s Radix entry’s “In numeral systems” section, most of us in web development are familiar with the hexadecimal system (radix number 16). Most of us are also used to using other systems in some form, like the binary numeral system or base two (radix number 2) because computers are based on this (ones and zeros) and the sexagesimal system (radix number 60) when we look at our clocks or navigate on a map.

So, parseInt and radix are nice to know since as web developers, we may need to convert times, navigation coordinates, or colors from hex to rgb (parseInt("FF", 16) \\ 255). We may also want to enable users to enter numbers as strings, like one month for example, to make our inputs more user friendly and natural. Then, we can convert that one to 1 using parseInt("one", 10) \\ 1 so we can do more things with it in our code.

Still working on the basic section, around half way through. Havent been able to do much on the challenges due to having a tech test to do which I have had to learn a lot more JS for what I currently knew.

2 Likes

I have not started yet. I intend to finish the Basic Javascript section by Wednesday of this week. Fingers crossed

1 Like

It wouldn’t let me vote, did it close because I didn’t see this until April 15 perhaps? Anyway, I’ve finished all of section one and I’m working through section2. In fact I’m almost done with that too, working my way through functional programming. For me, the REGEX section was the hardest so far…

1 Like

Might I suggest adding The JavaScript Way to the list of recommended resources? it’s a beginner-friendly book written in ES2015 and entirely free to read on GitHub (à la YDKJS). It also includes many exercises and projects. I do think it complements the FCC curriculum nicely.

Disclaimer: I’m the author.

2 Likes

Hello,
please add me to the list?
kevin