{"id":3643,"date":"2015-04-02T22:24:12","date_gmt":"2015-04-02T22:24:12","guid":{"rendered":"http:\/\/webninjataylor.com\/library\/?p=3643"},"modified":"2015-04-02T22:24:52","modified_gmt":"2015-04-02T22:24:52","slug":"js-basics-to-building","status":"publish","type":"post","link":"https:\/\/webninjataylor.com\/library\/js-basics-to-building\/","title":{"rendered":"JS Basics to Building"},"content":{"rendered":"<ul>\n<li>JavaScript has syntax AND grammar<\/li>\n<li>Expressions and statements\n<ul>\n<li>Statements are 1:1 and end with a semicolon (e.g. <span class=\"code\">a = b * 2;<\/span>)<\/li>\n<li>&#8216;2&#8217; is a numerical expression<\/li>\n<li>&#8216;b&#8217; is an identifier expression<\/li>\n<li>&#8216;b * 2&#8217; is a mathematical expression<\/li>\n<li>&#8216;a = b * 2&#8217; is a statement expression<\/li>\n<\/ul>\n<\/li>\n<li>JavaScript uses operator\u00a0precedence, but added unnecessary parenthesis are fine for aiding developer reading<\/li>\n<li>JS gets compiled for error checking instead of interpreting line by line and then throwing an error<\/li>\n<li><span style=\"line-height: 1.5;\">Console prints out different data types in different colors &#8230; numbers in blue are mathematical, whereas black is a string<\/span><\/li>\n<li><span style=\"line-height: 1.5;\">.String(a) \u2026 is conversion \u2026 which is explicit<\/span><\/li>\n<li><span style=\"line-height: 1.5;\">Coercion is implicit<\/span><\/li>\n<li><span style=\"line-height: 1.5;\">Declare variables with var, let, const, or function d()<\/span><\/li>\n<li><span style=\"line-height: 1.5;\">&#8220;falsy&#8221; values = 0, -0, Nan, &#8220;&#8221;, false, null, undefined<\/span><\/li>\n<li><span style=\"line-height: 1.5;\">while (a) { \u2026 } &#8211; keep doing until &#8216;a&#8217; is falsy<\/span><\/li>\n<li><span style=\"line-height: 1.5;\">It&#8217;s an argument when it gets passed in, but it&#8217;s a parameter if you declare it &#8230; function(myParam)<\/span><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>JavaScript has syntax AND grammar Expressions and statements Statements are 1:1 and end with a semicolon (e.g. a = b * 2;) &#8216;2&#8217; is a numerical expression &#8216;b&#8217; is an identifier expression &#8216;b * 2&#8217; is a mathematical expression &#8216;a = b * 2&#8217; is a statement expression JavaScript uses operator\u00a0precedence, but added unnecessary parenthesis [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[144],"tags":[9],"class_list":["post-3643","post","type-post","status-publish","format-standard","hentry","category-web-shots","tag-javascript"],"_links":{"self":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/3643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/comments?post=3643"}],"version-history":[{"count":2,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/3643\/revisions"}],"predecessor-version":[{"id":3646,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/posts\/3643\/revisions\/3646"}],"wp:attachment":[{"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/media?parent=3643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/categories?post=3643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webninjataylor.com\/library\/wp-json\/wp\/v2\/tags?post=3643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}