{"id":4677,"date":"2018-10-22T20:37:34","date_gmt":"2018-10-22T18:37:34","guid":{"rendered":"https:\/\/monodes.com\/predaelli\/?p=4677"},"modified":"2018-10-22T10:55:15","modified_gmt":"2018-10-22T08:55:15","slug":"conditional-javascript-for-experts-hacker-noon","status":"publish","type":"post","link":"https:\/\/monodes.com\/predaelli\/2018\/10\/22\/conditional-javascript-for-experts-hacker-noon\/","title":{"rendered":"Conditional JavaScript for Experts \u2013 Hacker Noon"},"content":{"rendered":"<blockquote><p>Mastery of conditional expressions for cleaner codes<\/p><\/blockquote>\n<p>They say in <em><a href=\"https:\/\/hackernoon.com\/conditional-javascript-for-experts-d2aa456ef67c\">Conditional JavaScript for Experts \u2013 Hacker Noon<\/a>. What they are suggesting is to use side-effects of\u00a0 &#8220;expression&#8221;, as Javascript does <strong>not<\/strong> separate commands and queries.<\/em><\/p>\n<p>Call me dogmatic but this behavior to look like a fundamental ingredient for disaster. In fact the same article says that&#8217;s better to use the ternary operator.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p class=\"excerpt\">Mastery of conditional expressions for cleaner codes They say in Conditional JavaScript for Experts \u2013 Hacker Noon. What they are suggesting is to use side-effects of\u00a0 &#8220;expression&#8221;, as Javascript does not separate commands and queries. Call me dogmatic but this behavior to look like a fundamental ingredient for disaster. In fact the same article says&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"https:\/\/monodes.com\/predaelli\/2018\/10\/22\/conditional-javascript-for-experts-hacker-noon\/\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[34,50],"tags":[],"class_list":["post-4677","post","type-post","status-publish","format-standard","hentry","category-eiffel","category-javascript"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6daft-1dr","jetpack-related-posts":[{"id":1737,"url":"https:\/\/monodes.com\/predaelli\/2016\/08\/18\/math-js\/","url_meta":{"origin":4677,"position":0},"title":"math.js","author":"Paolo Redaelli","date":"2016-08-18","format":"link","excerpt":"Math.js is an extensive math library for JavaScript and Node.js. It features big numbers, complex numbers, matrices, units, and a flexible expression parser. Sorgente: math.js","rel":"","context":"In &quot;Javascript&quot;","block_context":{"text":"Javascript","link":"https:\/\/monodes.com\/predaelli\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1614,"url":"https:\/\/monodes.com\/predaelli\/2016\/06\/01\/javascript-factory-functions-vs-constructor-functions-vs-classes-javascript-scene-medium\/","url_meta":{"origin":4677,"position":1},"title":"JavaScript Factory Functions vs Constructor Functions vs Classes \u2014 JavaScript Scene \u2014 Medium","author":"Paolo Redaelli","date":"2016-06-01","format":"link","excerpt":"https:\/\/medium.com\/javascript-scene\/javascript-factory-functions-vs-constructor-functions-vs-classes-2f22ceddf33e#.13avjf4lk","rel":"","context":"In &quot;Senza categoria&quot;","block_context":{"text":"Senza categoria","link":"https:\/\/monodes.com\/predaelli\/category\/senza-categoria\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11779,"url":"https:\/\/monodes.com\/predaelli\/2024\/06\/29\/state-of-javascript-2023\/","url_meta":{"origin":4677,"position":2},"title":"State of JavaScript 2023","author":"Paolo Redaelli","date":"2024-06-29","format":false,"excerpt":"State of JavaScript 2023 The 2023 edition of the annual survey about the latest trends in the JavaScript ecosystem.","rel":"","context":"In &quot;Javascript&quot;","block_context":{"text":"Javascript","link":"https:\/\/monodes.com\/predaelli\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3228,"url":"https:\/\/monodes.com\/predaelli\/2017\/07\/20\/reverse-engineering-one-line-of-javascript\/","url_meta":{"origin":4677,"position":3},"title":"Reverse Engineering One Line of JavaScript","author":"Paolo Redaelli","date":"2017-07-20","format":false,"excerpt":"ASCII animations in 1 line of #JS. #JavaScript is really the assembler of the Web","rel":"","context":"In &quot;Javascript&quot;","block_context":{"text":"Javascript","link":"https:\/\/monodes.com\/predaelli\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11556,"url":"https:\/\/monodes.com\/predaelli\/2024\/04\/03\/bun-a-fast-all-in-one-javascript-runtime\/","url_meta":{"origin":4677,"position":4},"title":"Bun \u2014 A fast all-in-one JavaScript runtime","author":"Paolo Redaelli","date":"2024-04-03","format":"link","excerpt":"Bun \u2014 A fast all-in-one JavaScript runtime Bundle, install, and run JavaScript & TypeScript \u2014 all in Bun. Bun is a new JavaScript runtime with a native bundler, transpiler, task runner, and npm client built-in.","rel":"","context":"In &quot;Javascript&quot;","block_context":{"text":"Javascript","link":"https:\/\/monodes.com\/predaelli\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":11932,"url":"https:\/\/monodes.com\/predaelli\/2024\/09\/23\/bun-a-fast-all-in-one-javascript-runtime-2\/","url_meta":{"origin":4677,"position":5},"title":"Bun \u2014 A fast all-in-one JavaScript runtime","author":"Paolo Redaelli","date":"2024-09-23","format":false,"excerpt":"Bundle, install, and run JavaScript & TypeScript \u2014 all in Bun. Bun is a new JavaScript runtime with a native bundler, transpiler, task runner, and npm client built-in. Gonna try this Bun \u2014 A fast all-in-one JavaScript runtime","rel":"","context":"In &quot;Javascript&quot;","block_context":{"text":"Javascript","link":"https:\/\/monodes.com\/predaelli\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/4677","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/comments?post=4677"}],"version-history":[{"count":0,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/posts\/4677\/revisions"}],"wp:attachment":[{"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/media?parent=4677"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/categories?post=4677"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/monodes.com\/predaelli\/wp-json\/wp\/v2\/tags?post=4677"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}