{"id":454,"date":"2021-04-18T17:55:32","date_gmt":"2021-04-18T16:55:32","guid":{"rendered":"https:\/\/codeflarelimited.com\/blog\/?p=454"},"modified":"2022-06-08T05:27:01","modified_gmt":"2022-06-08T04:27:01","slug":"7-javascript-shortcuts-you-should-be-using-in-next-project","status":"publish","type":"post","link":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/","title":{"rendered":"7 Javascript Shortcuts You Should Use in Your Next Project"},"content":{"rendered":"\n<p>You&#8217;ve probably heard it a lot:  Work smart and not hard. <\/p>\n\n\n\n<p>That advice couldn&#8217;t be more legit, especially when it comes to programming. Especially when it comes to Javascript.<\/p>\n\n\n\n<p>Beyond just embracing the <strong><a href=\"https:\/\/codinglead.github.io\/javascript\/what-is-DRY-code\" target=\"_blank\" rel=\"noreferrer noopener\">DRY<\/a><\/strong> (Do Not Repeat Yourself) concept, writing elegant and simple codes makes it easier for a codebase to be easily read and understood.<\/p>\n\n\n\n<p>Here are 7 shortcuts you should use in your next Javascript project:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-1-template-literals\">1. Template Literals<\/h2>\n\n\n\n<p>Template literals allow for multi-line and embedded string expressions. This can be especially useful when you want to concatenate 2 or more strings together, helping you to avoid the concatenation hell.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-hard-way\">Hard way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">let fname, lname;\nfname = \"Lawson\";\nlname = \"Luke\";\n\nconsole.log(\"Hello \"+fname \" \"+ lname);<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-smart-way\">Smart way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">console.log(`Hello ${fname} ${lname}`);<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-2-for-of-loop\">2. For of Loop<\/h2>\n\n\n\n<p>Loops helps you to iterate through an array.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-hard-way-1\">Hard Way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">let foods = [\"rice\", \"beans\", \"egg\", \"bread\", \"meat\"];\nfor(let i =0; i&lt;foods.length; i++){\nconsole.warn(foods[i]);\n}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-smart-way-1\">Smart way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">for(item of foods){\nconsole.warn(item);\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-3-recursion\">3. Recursion<\/h2>\n\n\n\n<p>Most times when a task is being executed, it can be in the process call other functions. But a recursive function is one which calls itself.<\/p>\n\n\n\n<p>Let&#8217;s write a countdown function, one that counts down from a given number.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-hard-way-2\">Hard way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">function countDown(num){\nfor(let i=num; i&gt;0; i--){\nconsole.log(i);\n}\ncountDown(20);<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-recursive-smart-way\">Recursive Smart way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">function countDown(num){\nif(num === 0){\nreturn;\n}\nconsole.log(num);\ncounter(num - 1);\n}\ncountDown(20);<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-4-ternary-operators\">4. Ternary Operators<\/h2>\n\n\n\n<p>Ternary operators allow for conditional rendering and can be executed with just one line of code.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-hard-way-3\">Hard way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const x = 50;\nlet answer;\nif (x &gt; 50) {\n    answer = 'greater than 50';\n} else {\n    answer = 'less than 50';\n}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-smart-way-2\">Smart way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const answer = x &gt; 50 ? 'greater than 50' : 'less than 50';<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-5-arrays-filter\">5. Arrays Filter<\/h2>\n\n\n\n<p>Let&#8217;s assume we want to print out all multiples of 3 from a given array.<\/p>\n\n\n\n<p>We could loop through the array and check for the required condition like so:<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-hard-way-4\">Hard way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">let num = [1,2,3,4,15,18,27,36];\n         for(let i = 0; i&lt;num.length; i++){\n             if(num[i]%3 === 0){\n                 console.log(num[i]);\n             }\n         }<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-smart-way-3\">Smart way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">  function getNum(val){\n            return val%3 === 0\n        }\n        let result = num.filter(getNum);\n        console.log(result);<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-6-short-circuit-evaluation\">6. Short-Circuit Evaluation<\/h2>\n\n\n\n<p>Sometimes when assigning a variable value to another variable, it is good to ensure that the source variable is not null, undefined or empty.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-hard-way-5\">Hard way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">if (variable1 !== null || variable1 !== undefined || variable1 !== '') {\n     let variable2 = variable1;\n}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-smart-way-4\">Smart way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const variable2 = variable1  || 'new';<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-7-object-property\">7. Object Property<\/h2>\n\n\n\n<p>With objects literals we can assign properties to objects.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-hard-way-6\">Hard way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const obj = { x:x, y:y };<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"h-smart-way-5\">Smart way:<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">const obj = { x, y };<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-conclusion\">Conclusion<\/h2>\n\n\n\n<p>Smart codes adds both elegance and readability to your codebase. This means your code can be easily understood and debugged afterwards.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You&#8217;ve probably heard it a lot: Work smart and not hard. That advice couldn&#8217;t be more legit, especially<\/p>\n","protected":false},"author":1,"featured_media":455,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[11],"tags":[],"class_list":["post-454","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>7 Javascript Shortcuts You Should Use in Your Next Project<\/title>\n<meta name=\"description\" content=\"7 Javascript Shortcuts You Should be Using in Next Project. We&#039;ve probably been told all our lives to work smart and not hard.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"7 Javascript Shortcuts You Should Use in Your Next Project\" \/>\n<meta property=\"og:description\" content=\"7 Javascript Shortcuts You Should be Using in Next Project. We&#039;ve probably been told all our lives to work smart and not hard.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/\" \/>\n<meta property=\"article:author\" content=\"https:\/\/facebook.com\/codeflretech\" \/>\n<meta property=\"article:published_time\" content=\"2021-04-18T16:55:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-06-08T04:27:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/04\/javascript.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"753\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"codeflare\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@codeflaretech\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/7-javascript-shortcuts-you-should-be-using-in-next-project\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/7-javascript-shortcuts-you-should-be-using-in-next-project\\\/\"},\"author\":{\"name\":\"codeflare\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/7e65653d49add95629f8c1053c5cd76a\"},\"headline\":\"7 Javascript Shortcuts You Should Use in Your Next Project\",\"datePublished\":\"2021-04-18T16:55:32+00:00\",\"dateModified\":\"2022-06-08T04:27:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/7-javascript-shortcuts-you-should-be-using-in-next-project\\\/\"},\"wordCount\":295,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/7-javascript-shortcuts-you-should-be-using-in-next-project\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/javascript.jpg\",\"articleSection\":[\"javascript\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/7-javascript-shortcuts-you-should-be-using-in-next-project\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/7-javascript-shortcuts-you-should-be-using-in-next-project\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/7-javascript-shortcuts-you-should-be-using-in-next-project\\\/\",\"name\":\"7 Javascript Shortcuts You Should Use in Your Next Project\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/7-javascript-shortcuts-you-should-be-using-in-next-project\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/7-javascript-shortcuts-you-should-be-using-in-next-project\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/javascript.jpg\",\"datePublished\":\"2021-04-18T16:55:32+00:00\",\"dateModified\":\"2022-06-08T04:27:01+00:00\",\"description\":\"7 Javascript Shortcuts You Should be Using in Next Project. We've probably been told all our lives to work smart and not hard.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/7-javascript-shortcuts-you-should-be-using-in-next-project\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/7-javascript-shortcuts-you-should-be-using-in-next-project\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/7-javascript-shortcuts-you-should-be-using-in-next-project\\\/#primaryimage\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/javascript.jpg\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2021\\\/04\\\/javascript.jpg\",\"width\":1200,\"height\":753,\"caption\":\"javascript\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/7-javascript-shortcuts-you-should-be-using-in-next-project\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"javascript\",\"item\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/javascript\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"7 Javascript Shortcuts You Should Use in Your Next Project\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"name\":\"\",\"description\":\"Sustainable solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#organization\",\"name\":\"Codeflare Limited\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"contentUrl\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/codeflare.png\",\"width\":1040,\"height\":263,\"caption\":\"Codeflare Limited\"},\"image\":{\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/#\\\/schema\\\/person\\\/7e65653d49add95629f8c1053c5cd76a\",\"name\":\"codeflare\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g\",\"caption\":\"codeflare\"},\"description\":\"Latest tech news and coding tips.\",\"sameAs\":[\"https:\\\/\\\/codeflarelimited.com\\\/blog\",\"https:\\\/\\\/facebook.com\\\/codeflretech\",\"https:\\\/\\\/instagram.com\\\/codeflaretech\",\"https:\\\/\\\/x.com\\\/codeflaretech\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCuBLtiYqsajHdqw0uyt7Ofw?sub_confirmation=1\"],\"url\":\"https:\\\/\\\/codeflarelimited.com\\\/blog\\\/author\\\/watcher\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"7 Javascript Shortcuts You Should Use in Your Next Project","description":"7 Javascript Shortcuts You Should be Using in Next Project. We've probably been told all our lives to work smart and not hard.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/","og_locale":"en_US","og_type":"article","og_title":"7 Javascript Shortcuts You Should Use in Your Next Project","og_description":"7 Javascript Shortcuts You Should be Using in Next Project. We've probably been told all our lives to work smart and not hard.","og_url":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/","article_author":"https:\/\/facebook.com\/codeflretech","article_published_time":"2021-04-18T16:55:32+00:00","article_modified_time":"2022-06-08T04:27:01+00:00","og_image":[{"width":1200,"height":753,"url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/04\/javascript.jpg","type":"image\/jpeg"}],"author":"codeflare","twitter_card":"summary_large_image","twitter_creator":"@codeflaretech","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/#article","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/"},"author":{"name":"codeflare","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/7e65653d49add95629f8c1053c5cd76a"},"headline":"7 Javascript Shortcuts You Should Use in Your Next Project","datePublished":"2021-04-18T16:55:32+00:00","dateModified":"2022-06-08T04:27:01+00:00","mainEntityOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/"},"wordCount":295,"commentCount":0,"publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/04\/javascript.jpg","articleSection":["javascript"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/","url":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/","name":"7 Javascript Shortcuts You Should Use in Your Next Project","isPartOf":{"@id":"https:\/\/codeflarelimited.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/#primaryimage"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/#primaryimage"},"thumbnailUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/04\/javascript.jpg","datePublished":"2021-04-18T16:55:32+00:00","dateModified":"2022-06-08T04:27:01+00:00","description":"7 Javascript Shortcuts You Should be Using in Next Project. We've probably been told all our lives to work smart and not hard.","breadcrumb":{"@id":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/#primaryimage","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/04\/javascript.jpg","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/04\/javascript.jpg","width":1200,"height":753,"caption":"javascript"},{"@type":"BreadcrumbList","@id":"https:\/\/codeflarelimited.com\/blog\/7-javascript-shortcuts-you-should-be-using-in-next-project\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/codeflarelimited.com\/blog\/"},{"@type":"ListItem","position":2,"name":"javascript","item":"https:\/\/codeflarelimited.com\/blog\/javascript\/"},{"@type":"ListItem","position":3,"name":"7 Javascript Shortcuts You Should Use in Your Next Project"}]},{"@type":"WebSite","@id":"https:\/\/codeflarelimited.com\/blog\/#website","url":"https:\/\/codeflarelimited.com\/blog\/","name":"","description":"Sustainable solutions","publisher":{"@id":"https:\/\/codeflarelimited.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/codeflarelimited.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/codeflarelimited.com\/blog\/#organization","name":"Codeflare Limited","url":"https:\/\/codeflarelimited.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","contentUrl":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2020\/11\/codeflare.png","width":1040,"height":263,"caption":"Codeflare Limited"},"image":{"@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/codeflarelimited.com\/blog\/#\/schema\/person\/7e65653d49add95629f8c1053c5cd76a","name":"codeflare","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/59cef917c86d965eea581d2747f51bd6382003a68bfce7c8a4dfec98b4cd838d?s=96&d=mm&r=g","caption":"codeflare"},"description":"Latest tech news and coding tips.","sameAs":["https:\/\/codeflarelimited.com\/blog","https:\/\/facebook.com\/codeflretech","https:\/\/instagram.com\/codeflaretech","https:\/\/x.com\/codeflaretech","https:\/\/www.youtube.com\/channel\/UCuBLtiYqsajHdqw0uyt7Ofw?sub_confirmation=1"],"url":"https:\/\/codeflarelimited.com\/blog\/author\/watcher\/"}]}},"jetpack_featured_media_url":"https:\/\/codeflarelimited.com\/blog\/wp-content\/uploads\/2021\/04\/javascript.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/comments?post=454"}],"version-history":[{"count":8,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/454\/revisions"}],"predecessor-version":[{"id":755,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/posts\/454\/revisions\/755"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media\/455"}],"wp:attachment":[{"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/media?parent=454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/categories?post=454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codeflarelimited.com\/blog\/wp-json\/wp\/v2\/tags?post=454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}