Showing posts with label WonderS. Show all posts
Showing posts with label WonderS. Show all posts

Tuesday, July 2, 2013

An Instanceof learning ...see what I did there??

Hello!  Well today was mostly filled with wedding planning stuff, but I *did* manage to squeeze in some time to read my book (thanks again WonderS!!) and do a bit more on Codecademy.  Today I learned the JavaScript operator 'Instanceof '  The syntax goes:
object instanceof constructor
Basically it is used as a test to see if the object you have created is truly an instance of a prior constructor.  For example, if you had just made a constructor Car, and now you wanted to make a constructor electricCar you could use the notation:
ElectricCar.prototype = new Car ();
then you could use instanceof to test if ElectricCar had inherited all the atributes of Car.  :D  Pretty awesome, huh? Well that's all for me today! 
Read More

Monday, July 1, 2013

Teachers and Tools

Over the weekend I was still really struggling with the Blackjack game.  I was soooo frustrated because 1) it was working and 2) I didn't know why.  What I *did* know was my lil variable "pleasework" was a necessity..
 and that without it my life was in ruins.

Enter a genius programmer, my friend Stu.  I emailed Stu Saturday morning with a plea for help.  Because he's basically Superman (only cool), he was at our house Saturday afternoon with all these mind-blowing TOOLS to help me work through my problem.  Let's just go ahead and say Stu = WonderS.  The first TOOL WonderS gave me was jsFiddle. Then, WonderS showed me how to use Chrome's debugger for JavaScript. THEN, WonderS checked to make sure I understood why everything that WAS working was good, and how to piece apart when things WERE NOT working.  We discovered a mishap in proof reading was the cause of all my misfortune:

After all the help, intro to a bit of theory, and buying me a book (he also lent me another), WonderS ate a bit of food and left to finish off his weekend.

Your's truly owes this man heaps in progressing/learning JavaScript.  This weekend I learned the value of a debugger.  Thank you, WonderS!


Read More