)]}'
{"web/src/containers/build/Manifest.jsx":[{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"b2588dcd810feb501b77c28e82c31bca1b6dda6a","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"const renderTree \u003d (tenant, build, path, obj) \u003d\u003e {"},{"line_number":23,"context_line":"  const node \u003d {}"},{"line_number":24,"context_line":"  let name \u003d obj.name"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"  if (\u0027children\u0027 in obj \u0026\u0026 obj.children) {"},{"line_number":27,"context_line":"    node.nodes \u003d obj.children.map(n \u003d\u003e renderTree(tenant, build, path+\u0027/\u0027+obj.name+\u0027/\u0027, n))"}],"source_content_type":"text/jsx","patch_set":1,"id":"7faddb67_a701b53a","line":24,"updated":"2019-07-30 21:19:07.000000000","message":"Need \"var log_prefix\" here to define the variable.","commit_id":"ec5abce3e8952cbcf12269d49700ccfe2caccc04"},{"author":{"_account_id":1,"name":"James E. Blair","email":"jim@acmegating.com","username":"corvus"},"change_message_id":"c0885fd0e5a5d9bdbcc7921312edbfe5b109e084","unresolved":false,"context_lines":[{"line_number":22,"context_line":"const renderTree \u003d (tenant, build, path, obj) \u003d\u003e {"},{"line_number":23,"context_line":"  const node \u003d {}"},{"line_number":24,"context_line":"  let name \u003d obj.name"},{"line_number":25,"context_line":"  var log_prefix : string"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"  if (\u0027children\u0027 in obj \u0026\u0026 obj.children) {"},{"line_number":28,"context_line":"    node.nodes \u003d obj.children.map(n \u003d\u003e renderTree(tenant, build, path+\u0027/\u0027+obj.name+\u0027/\u0027, n))"}],"source_content_type":"text/jsx","patch_set":2,"id":"7faddb67_c404e14c","line":25,"updated":"2019-07-31 14:57:08.000000000","message":"And if you have no initial value, as in this case, let x \u003d null ?","commit_id":"c63b7e7e12ee9da841e3d7ae5f722d51d26f646b"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"956ce8027af47720155b6d772193aee85a95ed09","unresolved":false,"context_lines":[{"line_number":22,"context_line":"const renderTree \u003d (tenant, build, path, obj) \u003d\u003e {"},{"line_number":23,"context_line":"  const node \u003d {}"},{"line_number":24,"context_line":"  let name \u003d obj.name"},{"line_number":25,"context_line":"  var log_prefix : string"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"  if (\u0027children\u0027 in obj \u0026\u0026 obj.children) {"},{"line_number":28,"context_line":"    node.nodes \u003d obj.children.map(n \u003d\u003e renderTree(tenant, build, path+\u0027/\u0027+obj.name+\u0027/\u0027, n))"}],"source_content_type":"text/jsx","patch_set":2,"id":"7faddb67_e4531d6a","line":25,"range":{"start_line":25,"start_character":2,"end_line":25,"end_character":5},"updated":"2019-07-31 14:55:27.000000000","message":"Using let instead of var is better, although this is working code, so I\u0027m fine with it.\n\nThe scoping rules between the two are different - it doesn\u0027t matter in this patch, but in general var is WEIRD so it\u0027s good to develop a habit of using let instead.\n\n(tl;dr - if you do:\n\n console.log(x)\n var x \u003d 5\n\nThe console log will print \"undefined\" because for strange reasons javascript decides to scope var x to the entire surrounding block.\n\nlet works like we expect variables to work from python:\n\n  console.log(x)\n  let x \u003d 5\n\nresults in an error of x not being defined - because x isn\u0027t defined until it is when you use let.","commit_id":"c63b7e7e12ee9da841e3d7ae5f722d51d26f646b"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"59cf1e2961aa6c35eb85cd27bc8d8a8c9056d24d","unresolved":false,"context_lines":[{"line_number":22,"context_line":"const renderTree \u003d (tenant, build, path, obj) \u003d\u003e {"},{"line_number":23,"context_line":"  const node \u003d {}"},{"line_number":24,"context_line":"  let name \u003d obj.name"},{"line_number":25,"context_line":"  var log_prefix : string"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"  if (\u0027children\u0027 in obj \u0026\u0026 obj.children) {"},{"line_number":28,"context_line":"    node.nodes \u003d obj.children.map(n \u003d\u003e renderTree(tenant, build, path+\u0027/\u0027+obj.name+\u0027/\u0027, n))"}],"source_content_type":"text/jsx","patch_set":2,"id":"7faddb67_84a82920","line":25,"in_reply_to":"7faddb67_c404e14c","updated":"2019-07-31 14:59:14.000000000","message":"Same thing - the console.log is still an error, because x hasn\u0027t been defined yet. You can even do:\n\n  console.log(x)\n  let x\n\nand the first line will be an error.\n\n(incidentally, you can put those lines in a foo.js file and run \"node foo.js\" on the CLI and it\u0027ll demonstrate the behavior differences)","commit_id":"c63b7e7e12ee9da841e3d7ae5f722d51d26f646b"}]}
