school/html-java-script/Week8/unit-8-javascript.org
2021-03-31 21:56:49 -04:00

27 lines
1.0 KiB
Org Mode

* 3 new
** We learned that Javascript has var, let, and const.
Var being the origional and assigns globals
Let being new as of 2015 to assign locals
And also Const to make immutables
Declared, but uninitialized, variables have a value of
undefined
Redeclared variables do not lose their value
** Multiple variables can be declared and assigned by using commas
5 data types, string number boolean null and undefined
* 2 Interesting
** 1
I'm someone who likes working close to the metal, but I like
the way they explained using encapsulation to design your code
I've often found myself wondering how to organize code,
but this concept of, write code until you feel that peice
is done, wrap it into a function, and then move onto
the next step, somewhat made it click a bit better for me.
Having used Lisp, I've loved the lots of small functions
concept, but I suppose I always had trouble with design.
Somehow, thinking about it this way, works for me.
* 1 not clear
The difference between null and undefined.