Hacking My (Dot) Life

Bonfire: Factorialize a number

While doing this (yet still unsolved) bonfire I came to realize that my life long issues with math  lies in not really wanting/caring to know the names/title of the parts of an operation.

With this Bonfire, I wanted to do it all on my own and my biggest hurdle was figuring out what goes where.  I sat and REALLY looked at the syntax that was provided:

 

Capture

 

Despite my having taken that JavaScript class, and doing little tutorials here and there, I have the bad habit of following the instructions but not paying too much attention to the explanation of what things are.  How can I know what’s missing if I don’t really understand what’s currently there and what I need to fill in.  Again, I read things, I analyze it, I do it but It’s when I sit down and really ask myself “WTF am I looking at”, do I really start to feel the information sinking in.  I know most of my posts touch a lot of HOW I learn and not WHAT I’m learning, but the thing that has been on the forefront of this journey is learning and seeing HOW I learn so that I can maximize and effectively learn this content.

So, on my journey to figuring out WHAT I was looking at, I came across LearnCodeCademy’s revised Javascript Youtube Tutorials For Beginners – #3 Javascript Functions .  I must have watched it over 5 times, pausing, analyzing what the parts of a function are, exactly how return works and a break down of a function what what the parts that make up a function are and what can/won’t happen if you place things a certain way.  I have read what it is MANY times and have been explained how return works, this is the first time it sinks in and makes sense to me (no fault placed on prior tutorials or teachers).

To sink in the content more, I reread the section of Jon Duckett’s Javascript book where it explains functions, what they are and how they work and I was able to comprehend and see and recognize the parts of a function.

I still haven’t been able to solve the Bonfire, but now I’m not staring at it wondering where I should “plug something in”.  I now understand the following:

  • why factorialize (5) is at the bottom (so that I can call it, and I can do so as MANY times as I want).
  • Once a value is “returned”, that’s it.  It’s over.
  • Scripts aren’t read in order, the way HTML is read.  Learning that cleared a LOT of my confusion.

I haven’t yet solved the problem, but based on what I’ve learned so far and the explanation that the Bonfire gives for what a “Factorialize” is, I’m thinking I might have to do a loop in order to solve the Bonfire.

Leave a Reply

Your email address will not be published. Required fields are marked *