{"id":511,"date":"2024-03-07T14:52:14","date_gmt":"2024-03-07T14:52:14","guid":{"rendered":"https:\/\/beinthecloud.biz\/sfdc\/1\/?p=511"},"modified":"2024-05-22T01:43:31","modified_gmt":"2024-05-22T01:43:31","slug":"511","status":"publish","type":"post","link":"https:\/\/beinthecloud.biz\/sfdc\/1\/2024\/03\/07\/511\/","title":{"rendered":"JavaScript Let"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<div class=\"jetpack-video-wrapper\"><iframe loading=\"lazy\" title=\"JavaScript Let\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/xblPUPw2IUQ?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div>\n<\/div><\/figure>\n\n\n\n<p>Variables declared with&nbsp;<code>let<\/code>&nbsp;have&nbsp;<strong>Block Scope<\/strong><\/p>\n\n\n\n<p>Variables declared with&nbsp;<code>let<\/code>&nbsp;must be&nbsp;<strong>Declared<\/strong>&nbsp;before use<\/p>\n\n\n\n<p>Variables declared with&nbsp;<code>let<\/code>&nbsp;cannot be&nbsp;<strong>Redeclared<\/strong>&nbsp;in the same scope<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>JavaScript Let<\/p>\n\n\n\n<p> ========== <\/p>\n\n\n\n<p>let x = 1; <\/p>\n\n\n\n<p>{ let x = 2; document.getElementById(&#8220;d2&#8221;).innerHTML = x; } <\/p>\n\n\n\n<p>{ let x = 3; document.getElementById(&#8220;d3&#8221;).innerHTML = x; } <\/p>\n\n\n\n<p>document.getElementById(&#8220;d1&#8221;).innerHTML = x;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Variables declared with&nbsp;let&nbsp;have&nbsp;Block Scope Variables declared with&nbsp;let&nbsp;must be&nbsp;Declared&nbsp;before use Variables declared with&nbsp;let&nbsp;cannot be&nbsp;Redeclared&nbsp;in the same scope JavaScript Let ========== let x = 1; { let x = 2; document.getElementById(&#8220;d2&#8221;).innerHTML = x; } { let x = 3; document.getElementById(&#8220;d3&#8221;).innerHTML = x; } document.getElementById(&#8220;d1&#8221;).innerHTML = x;<\/p>\n","protected":false},"author":1,"featured_media":512,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[16],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/beinthecloud.biz\/sfdc\/1\/wp-content\/uploads\/2024\/03\/How-to-use-Prettier-in-VS-Code-Code-Formatting-8.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/beinthecloud.biz\/sfdc\/1\/wp-json\/wp\/v2\/posts\/511"}],"collection":[{"href":"https:\/\/beinthecloud.biz\/sfdc\/1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/beinthecloud.biz\/sfdc\/1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/beinthecloud.biz\/sfdc\/1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/beinthecloud.biz\/sfdc\/1\/wp-json\/wp\/v2\/comments?post=511"}],"version-history":[{"count":2,"href":"https:\/\/beinthecloud.biz\/sfdc\/1\/wp-json\/wp\/v2\/posts\/511\/revisions"}],"predecessor-version":[{"id":529,"href":"https:\/\/beinthecloud.biz\/sfdc\/1\/wp-json\/wp\/v2\/posts\/511\/revisions\/529"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/beinthecloud.biz\/sfdc\/1\/wp-json\/wp\/v2\/media\/512"}],"wp:attachment":[{"href":"https:\/\/beinthecloud.biz\/sfdc\/1\/wp-json\/wp\/v2\/media?parent=511"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/beinthecloud.biz\/sfdc\/1\/wp-json\/wp\/v2\/categories?post=511"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/beinthecloud.biz\/sfdc\/1\/wp-json\/wp\/v2\/tags?post=511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}