In the JavaScript language, describe all the use cases for each of:
Parentheses ()
Parentheses have a couple functions that I am aware of. They are used to
contain a list of parameters passed to functions and control structures and
they are used to group expressions to control the order of execution.
function bindEventListeners (dots) Some functions have no parameters
and in this case, the space between parentheses is blank. function()
Brackets []
Use brackets for an array of simple values. For example:
board.cells[i]["surroundingMines"] =
Braces {}
Use braces for key => value arrays and objects/properties. For example:
function start () {
bindEventListeners(document.getElementsByClassName('board')[0].children)
}
Single quotes '' && Double quotes ""
Both single and double quotes are used to enclose a string. For example:
var string = "This is a string"
Control
When programming, what are some of your triggers? What causes a disproportionate emotional response?
My biggest trigger is not being able to understand what I need to do, EDA
is nothing like school where as if your struggling you can go and ask your
teacher for help and have some good one on one time or stay after school to
receive extra tutoring, right now Im feeling like I'm in the deep end, this week
has been the first week I have properly struggled with and I'm pretty gutted but
I keep trying and trying until I get it. Once I wrap my head around all this
javascript stuff Ill be good as gold again!
How did you find the Siberian North Railroad exercise (Stop, Breathe, Notice, Reflect, Respond)?
Very lovely! I'm the type of person who loves to stop, breathe, and think
about what I am doing, I always need a plann and I also like to think ahead
seeing how stuff will affect me later on, so this exercise relates to me really
well and fits in perfectly with me.