<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sam Sedighian</title>
    <description>The latest articles on DEV Community by Sam Sedighian (@sedighian).</description>
    <link>https://dev.to/sedighian</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F184344%2Fd7a070fe-cb0a-4687-8313-0a9fc7249fec.jpg</url>
      <title>DEV Community: Sam Sedighian</title>
      <link>https://dev.to/sedighian</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sedighian"/>
    <language>en</language>
    <item>
      <title>How and why we Bug Bash at LinkedIn and why you should too</title>
      <dc:creator>Sam Sedighian</dc:creator>
      <pubDate>Wed, 26 May 2021 22:08:47 +0000</pubDate>
      <link>https://dev.to/sedighian/how-and-why-we-bug-bash-at-linkedin-and-why-you-should-too-23fi</link>
      <guid>https://dev.to/sedighian/how-and-why-we-bug-bash-at-linkedin-and-why-you-should-too-23fi</guid>
      <description>&lt;p&gt;If you have been doing any kind of software development you are familiar with the bug bash concept in one way or another, even though you may call it something else. I want to share with you what I have learned doing bug bashes at LinkedIn for the past 2+ years and how it gives us confidence for releasing code at the scale of, well, the planet.&lt;/p&gt;




&lt;h2&gt;
  
  
  The what
&lt;/h2&gt;

&lt;p&gt;Bug Bash is a cross-functional event for stress testing every bit of a new feature planned for external release. The format of this event is highly collaborative and async and with today's circumstances, fully virtual, however, it has always had an optional virtual attendance under regular business situations as well. Bug Bashes usually range somewhere between 1 to 2 hours in time and includes members from Marketing, Business Development, accessibility (a11y) as well as the usual suspects of Design, Product and, Engineering (perhaps also QA for some companies. At LinkedIn we do not have a dedicated team for QA as we all wear that hat).&lt;/p&gt;




&lt;h2&gt;
  
  
  The How
&lt;/h2&gt;

&lt;h4&gt;
  
  
  Preparation
&lt;/h4&gt;

&lt;p&gt;Preparation is arguably the most important part of the bug bash. This is usually done by one person (or one per platform). A well-prepared bug bash is destined for success while a not-prepared bug bash is a recipe for wasting your colleague's time and a post launch failure.&lt;/p&gt;

&lt;p&gt;The good thing is that preparation is not complicated and can even be done by the team intern. For the rest of this section let's say we came up with a new Navigation bar for LinkedIn. Make sure to send out the prep doc along with the event invite and for those taking part in the bug bash in an async manner a note on the deadline to file the bugs.&lt;/p&gt;

&lt;p&gt;A Good bug bash doc should include the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;POCs&lt;/li&gt;
&lt;li&gt;Set up instructions&lt;/li&gt;
&lt;li&gt;Test cases and Categories to cover&lt;/li&gt;
&lt;li&gt;Bug reporting instructions&lt;/li&gt;
&lt;li&gt;Resources - specs and anything else that may be required&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Below is an example of such bug bash doc:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--f7mjpsi2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bib06d0yu8e448lhvx8w.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--f7mjpsi2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bib06d0yu8e448lhvx8w.jpeg" alt="A bug bash document with info about the event, POCs, setup instructions, test cases and categories, bug reporting instructions and resources"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Sample Bug Bash document for the Navbar feature. &lt;a href="https://dev.toThe%20actual%20doc"&gt;https://docs.google.com/document/d/1ZT_W5wzdyP8xF16jMQL5FL1vuV85M6yeNbVOXmFqLPo/edit?usp=sharing&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  Bug Bash event
&lt;/h4&gt;

&lt;p&gt;Make sure to send out the prepared doc for the bug bash at least 24 hours ahead of time, giving everyone ample time to set up and address any issue before the event so that you are not wasting time trying to debug individual issues.&lt;/p&gt;

&lt;p&gt;At LinkedIn we like to start meeting with a success statement, so for example: "This meeting/bug-bash will be a success if we will be able to cover all test cases &amp;amp; categories mentioned in the preparation doc for all platforms"&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;[For Engineers] If possible avoid bug bashing your code as you might be so close to it that miss issues. Instead, focus your time bug bashing other's code or be the resource for others for the session.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Remember 1–2 hours is not enough time so you may need to divide and conquer. As long as you cover all categories and come up with solid documentation of the issues it is a success. Based on the scope of the bug bash and the number of issues found, you may have to set up another bug bash for a future time. There is no shame in multiple bug bashes, if anything it tells you that the bug bash was a success.&lt;/p&gt;

&lt;h4&gt;
  
  
  Post Bug bash
&lt;/h4&gt;

&lt;p&gt;Remember the bug bash is async so they might be some more bugs trickling in after the event. With that said this is the time where the team huddles and assesses if they are aligned on the mission and vision and if so, given the level of feedback from the bug bash are they on track for the previously communicated release deadline and if need be, make appropriate adjustments and communications. This is the time to triage the tickets and start working on addressing all issues.&lt;/p&gt;

&lt;p&gt;Finally, and perhaps optionally (depending on the scale of the feature) you may send out a follow-up communication on the bug bash event and the next steps to the stakeholders. As a bonus, this is the step that makes the difference between a good POC and a great one so don't skip this if you want to excel at your position. Do not forget to thank and give credit to all involved. Teamwork makes the dream work!&lt;/p&gt;

&lt;h4&gt;
  
  
  Feature Release
&lt;/h4&gt;

&lt;p&gt;Bug Bash is not the ultimate bug-finding solution so as always ensure you are ramping the feature incrementally and measure and solicit feedback at every ramp stage.&lt;/p&gt;




&lt;h4&gt;
  
  
  What it means for Bug Bash to be async
&lt;/h4&gt;

&lt;p&gt;Don't let someone's inability to attend the bug bash meeting be a deterrence of them being another set of eyes on the deliverable. If you have put the effort into the preparation step it should not cost you any additional effort to have the bug bash set up as an async event.&lt;/p&gt;

&lt;p&gt;But what does it mean for the bug bash to be async? Async here means that those colleagues can contribute at their own pace or time given the same set of instructions and set up that was provided as part of the preparation. Just make sure to communicate a clear deadline on when to complete the bug bash by.&lt;/p&gt;

&lt;h4&gt;
  
  
  A11y
&lt;/h4&gt;

&lt;p&gt;I am going to highlight this one piece just because it has traditionally been an afterthought when developing software. A11y for so many reasons that I will spare you why is not optional nor even a fast follow-up for any release. So please use bug bash as an opportunity to hash out any shortcomings with a11y and better yet next time if you have not done so in this cycle make sure to include a section in both Product and Design specs for a11y.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Why
&lt;/h2&gt;

&lt;p&gt;If you are reading this you are most likely familiar with the why so let me tell you why we at LinkedIn put a big emphasis on this. LinkedIn is a big company with very complex and interconnected pieces serving an even more diverse audience, it is practically impossible for any group of engineers (regardless of size) to be able to think of every use case and scenario not to mention the crazy big landscape of devices and operating systems and platforms. When we bug bash we have the opportunity to get fresh sets of eyes on our deliverable that were not there in the development process or perhaps not for the same platform (iOS vs. Android vs. web). Finally, my favorite is having those colleagues that just have different usability habits or requirements such as keyboard-only or screenreader requirements (or any assistive technology for that matter).&lt;/p&gt;

&lt;h4&gt;
  
  
  What bug bash is not…
&lt;/h4&gt;

&lt;p&gt;For all its usefulness bug bash is not the right venue for a few things. For example, bug bash is not the place to question the overall objective of the feature or the product. It is completely valid to ask the question of whether or not the deliverable is aligned with the vision of the product and the mission of the company but it is not the right venue to question the vision and the mission. Also, a bug bash is not the right venue to exert your personal preferences, ideally and hopefully at a time much before the bug bash those feedbacks are solicited and taken into account, however, and regardless, at this point, the idea is to release to a wider audience of internal or external users for implicit and explicit feedback. Finally and perhaps most importantly, bug bash is not the venue to point fingers at any one person or group for a mistake or to try and figure out the how and who for addressing the issues that surfaced.&lt;/p&gt;




&lt;p&gt;I want to end this post with my gratitude to you for taking the time to read my thoughts. I also want to express my desire that we in the software development community have an opportunity and responsibility to &lt;strong&gt;make the web a more inclusive, safe, and accessible place for all&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Keep on coding!! ❤️ 💻&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Opinions are my own and not the views of LinkedIn. Examples in this blog post are just that, examples, and are not based on any actual works at LinkedIn or by any of its employees (including yours truly)&lt;/em&gt;&lt;/p&gt;

</description>
      <category>bugbash</category>
      <category>bestpractices</category>
      <category>productdevelopment</category>
    </item>
    <item>
      <title>Everything you need to know about NaN in JavaScript</title>
      <dc:creator>Sam Sedighian</dc:creator>
      <pubDate>Fri, 28 Feb 2020 16:31:54 +0000</pubDate>
      <link>https://dev.to/sedighian/everything-you-need-to-know-about-nan-in-javascript-113n</link>
      <guid>https://dev.to/sedighian/everything-you-need-to-know-about-nan-in-javascript-113n</guid>
      <description>&lt;p&gt;&lt;code&gt;NaN&lt;/code&gt; is a global property that represents the value of Not-A-Number, hence the name. It is possible to get the value &lt;code&gt;NaN&lt;/code&gt; returned when doing an arithmetic operation or coercing some value to a number. Here are some operations that result in &lt;code&gt;NaN&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="kc"&gt;Infinity&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="kc"&gt;Infinity&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="kc"&gt;undefined&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;

&lt;span class="c1"&gt;// [almost] all arithmetic operation involving NaN&lt;/span&gt;

&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="c1"&gt;// with the exception of&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 1&lt;/span&gt;

&lt;span class="c1"&gt;// Finally, coercing any value that does not have a numeric value&lt;/span&gt;

&lt;span class="nb"&gt;parseInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hi&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="nb"&gt;parseFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hi&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;({});&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hi&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hi&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hi&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hi&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hi&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// NaN&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;it is worth mentioning that most of the confusion about &lt;code&gt;NaN&lt;/code&gt; comes from the behavior of coercing a non-numeric-value to a numeric-value which results in &lt;code&gt;NaN&lt;/code&gt;. For this reason, I recommend getting yourself familiarized with the last few examples from the code above and better yet why some values such as booleans, &lt;code&gt;[1]&lt;/code&gt; and &lt;code&gt;''&lt;/code&gt; do not result in &lt;code&gt;NaN&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Interesting facts about  &lt;code&gt;NaN&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;NaN&lt;/code&gt; has a bad reputation for being tricky, however, if you familiarize yourself with the following few facts you will be able to work with &lt;code&gt;NaN&lt;/code&gt; with no issue.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;NaN&lt;/code&gt; unlike it's name is actually from the type Number&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// 'number'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;NaN&lt;/code&gt; Has a falsy value&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;Boolean&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;NaN&lt;/code&gt; is the only value in JavaScript that does not equal itself. Hint: this will become useful later on.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;

&lt;span class="c1"&gt;// No, it is not pointing to a differnt NaN object (no such thing)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;iAmNaN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;iAmNaN&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;iAmNaN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;//false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can access &lt;code&gt;NaN&lt;/code&gt; in four different ways.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;globalThis&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Avoid comparisons with &lt;code&gt;NaN&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Let's look at an example
&lt;/h3&gt;

&lt;p&gt;Let's say we have a function that takes one argument and increments it by &lt;code&gt;10&lt;/code&gt; .  We want to accept both numbers and strings representing a number so we will use &lt;code&gt;parseFloat&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;incrementByTen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;val&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;parseFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;val&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 10 ✅&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2.3&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 12.3 ✅&lt;/span&gt;

&lt;span class="cm"&gt;/*
  result of parseFloat will be NaN in examples below
  hence the addition operations will also return NaN
*/&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// NaN ❌&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// NaN ❌&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;({});&lt;/span&gt; &lt;span class="c1"&gt;// NaN ❌&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;([]);&lt;/span&gt; &lt;span class="c1"&gt;// NaN ❌&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// NaN ❌&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// NaN ❌&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="c1"&gt;// NaN ❌&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We just learned there are plenty of arguments which would result in &lt;code&gt;NaN&lt;/code&gt;. Perhaps a better way to handle this is to throw an error for those cases. However, as we learned earlier the usual comparisons will not work for &lt;code&gt;NaN&lt;/code&gt; as we can see below. For this reason, we will use the global function &lt;code&gt;isNaN&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="kc"&gt;NaN&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  what is &lt;code&gt;isNaN&lt;/code&gt; and how it works?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;isNaN&lt;/code&gt; is a global function, takes a single argument and returns a boolean indicating whether or not the argument passed is &lt;code&gt;NaN&lt;/code&gt;. MDN explains &lt;code&gt;isNaN&lt;/code&gt; as such:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The function [ &lt;code&gt;isNaN&lt;/code&gt; ] should be interpreted as answering the question, "is this value, when coerced to a numeric value, an IEEE-754 'Not A Number' value?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We now write our function with &lt;code&gt;isNaN&lt;/code&gt; to throw an error when the result of the &lt;code&gt;parseFloat&lt;/code&gt;  is &lt;code&gt;NaN&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;incrementByTen&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;val&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;parseFloat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;val&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Resulted in NaN!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 10 ✅&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;2.3&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// 12.3 ✅&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Error: Resulted in NaN! ✅&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Error: Resulted in NaN! ✅&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;({});&lt;/span&gt; &lt;span class="c1"&gt;// Error: Resulted in NaN! ✅&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;([]);&lt;/span&gt; &lt;span class="c1"&gt;// Error: Resulted in NaN! ✅&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Error: Resulted in NaN! ✅&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Error: Resulted in NaN! ✅&lt;/span&gt;
&lt;span class="nx"&gt;incrementByTen&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="c1"&gt;// Error: Resulted in NaN! ✅&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great, our function works as expected. Now let's learn a bit more about &lt;code&gt;isNaN&lt;/code&gt;. Best way to understand how &lt;code&gt;isNaN&lt;/code&gt; works is to create our own [basic version] polyfill for it. Polyfill is not required to use &lt;code&gt;isNaN&lt;/code&gt;, It is super old...IE 3 old! 👴🏽&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nb"&gt;isNaN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// coercing it into a numeric value. BEWARE OF THIS LINE&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="c1"&gt;// now checking to see if it does not equal itself&lt;/span&gt;
  &lt;span class="c1"&gt;// only NaN does not equal itself 🤯&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When working with &lt;code&gt;isNaN&lt;/code&gt; you need to beware of the coercion of the value to a numeric-value.  Remember some values cannot be coerced to a numeric-value and will result in &lt;code&gt;NaN&lt;/code&gt; so even though your argument to &lt;code&gt;isNaN&lt;/code&gt; might not have been &lt;code&gt;NaN&lt;/code&gt; it could become one.&lt;/p&gt;

&lt;p&gt;Here are a few examples where this happens and &lt;code&gt;isNaN&lt;/code&gt; does not work as we perhaps expect it to:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// true ✅&lt;/span&gt;

&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// true ❌&lt;/span&gt;
&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// true ❌&lt;/span&gt;
&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;({});&lt;/span&gt; &lt;span class="c1"&gt;// true ❌&lt;/span&gt;
&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="c1"&gt;// true ❌&lt;/span&gt;
&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// TypeError: Cannot convert a BigInt value to a number ❌&lt;/span&gt;
&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Symbol&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// Uncaught TypeError: Cannot convert a Symbol value to a number ❌&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;code&gt;Number.isNaN&lt;/code&gt; to the rescue 🦸🏻‍♀️
&lt;/h2&gt;

&lt;p&gt;For the reasons that should be clear from above using &lt;code&gt;isNaN&lt;/code&gt; is not ideal. This is why &lt;code&gt;Number.isNaN&lt;/code&gt; has been added to JavaScript starting from ES6. The main difference between the two functions is that &lt;code&gt;Number.isNaN&lt;/code&gt; does not convert its argument to a numeric-value before determining whether it is &lt;code&gt;NaN&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;NaN&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// true ✅&lt;/span&gt;

&lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;undefined&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// false ✅&lt;/span&gt;
&lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// false ✅&lt;/span&gt;
&lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;({});&lt;/span&gt; &lt;span class="c1"&gt;// false ✅&lt;/span&gt;
&lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="c1"&gt;// false ✅&lt;/span&gt;
&lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="nx"&gt;n&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// false ✅&lt;/span&gt;
&lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Symbol&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// false ✅&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great, it is working as expected. I recommend to always use &lt;code&gt;Number.isNaN&lt;/code&gt;. Even if you want to coerce the value to a numeric-value do it yourself and then use &lt;code&gt;Number.isNaN&lt;/code&gt; that way you are clearly expressing your intentions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Bad&lt;/span&gt;
&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;someValue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Good&lt;/span&gt;
&lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;someValue&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// And if we do need someValue to be coerced to a numeric-value&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;numericalValue&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;someValue&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// or Number(someValue)&lt;/span&gt;
&lt;span class="nb"&gt;Number&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numericalValue&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Alternatives to native &lt;code&gt;isNaN&lt;/code&gt; and &lt;code&gt;Number.isNaN&lt;/code&gt;
&lt;/h1&gt;

&lt;p&gt;As you can imagine before &lt;code&gt;Number.isNaN&lt;/code&gt; was introduced there were some workarounds for us to handle this which perhaps are no longer needed but worth noting.&lt;/p&gt;

&lt;h3&gt;
  
  
  Write your own
&lt;/h3&gt;

&lt;p&gt;If you are not going to use &lt;code&gt;Number.isNaN&lt;/code&gt;, this is perhaps the quickest and fastest way to get going. The key to understanding this function is that &lt;code&gt;isNaN&lt;/code&gt; is the only value that does not equal itself.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;_isNaN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Lodash and Underscore
&lt;/h3&gt;

&lt;p&gt;Both of these popular utility libraries have their own version of the functionality which works similar to &lt;code&gt;Number.isNaN&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;lodash&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;lodash&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;underscore&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;underscore&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;lodash&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nx"&gt;underscore&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;isNaN&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Resources and citations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;NaN&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;MDN &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;ECMAScript Spec &lt;a href="https://tc39.es/ecma262/#sec-value-properties-of-the-global-object-nan"&gt;https://tc39.es/ecma262/#sec-value-properties-of-the-global-object-nan&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;isNaN&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;MDN: &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/isNaN&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;ECMAScript Spec &lt;a href="https://tc39.es/ecma262/#sec-isnan-number"&gt;https://tc39.es/ecma262/#sec-isnan-number&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Lodash &lt;a href="https://lodash.com/docs/4.17.15#isNaN"&gt;https://lodash.com/docs/4.17.15#isNaN&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Underscore &lt;a href="https://underscorejs.org/#isNaN"&gt;https://underscorejs.org/#isNaN&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Number.isNaN&lt;/code&gt;

&lt;ul&gt;
&lt;li&gt;MDN &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN"&gt;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isNaN&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;ECMAScript Spec &lt;a href="https://tc39.es/ecma262/#sec-number.isnan"&gt;https://tc39.es/ecma262/#sec-number.isnan&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Related topics

&lt;ul&gt;
&lt;li&gt;freeCodeCamp: JavaScript type coercion explained  &lt;a href="https://www.freecodecamp.org/news/js-type-coercion-explained-27ba3d9a2839/"&gt;https://www.freecodecamp.org/news/js-type-coercion-explained-27ba3d9a2839/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;SitePoint ES6 New Number Methods &lt;a href="https://www.sitepoint.com/es6-number-methods/"&gt;https://www.sitepoint.com/es6-number-methods/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>Optional Chaining, Null Coalescing and how they will change the way you write code</title>
      <dc:creator>Sam Sedighian</dc:creator>
      <pubDate>Wed, 15 Jan 2020 05:36:39 +0000</pubDate>
      <link>https://dev.to/sedighian/optional-chaining-null-coalescing-and-how-they-will-change-the-way-you-write-code-2im9</link>
      <guid>https://dev.to/sedighian/optional-chaining-null-coalescing-and-how-they-will-change-the-way-you-write-code-2im9</guid>
      <description>&lt;p&gt;If you have been following the &lt;a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html"&gt;TypeScript releases&lt;/a&gt; recently you already know that in TypeScript 3.7 Optional Chaining and Nullish Coalescing were introduced. They are both part upcoming features of the JavaScript and as of the time of publishing this article, they are in &lt;a href="https://github.com/TC39/proposal-optional-chaining"&gt;stage 4&lt;/a&gt; and &lt;a href="https://github.com/tc39/proposal-nullish-coalescing"&gt;stage 3&lt;/a&gt; respectively.&lt;/p&gt;

&lt;p&gt;UPDATED: As of &lt;a href="https://babeljs.io/blog/2020/01/11/7.8.0"&gt;Babel 7.8.0&lt;/a&gt; These features are also included by default.&lt;/p&gt;

&lt;h2&gt;
  
  
  Optional Chaining
&lt;/h2&gt;

&lt;p&gt;Quite often we find ourselves working deep into an object to get the value of a property and if you have written more than 100 lines of code in JavaScript you know that this is the root of a well common error &lt;code&gt;Uncaught TypeError&lt;/code&gt; when not done right&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DocL0XRQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/h0kwf3y3n34lasxo1z3j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DocL0XRQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/h0kwf3y3n34lasxo1z3j.png" alt="Uncaught TypeError"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We are going to use this mock response for the rest of the examples:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9HC3allO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/phne8x3hgopzgj1e7o6h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9HC3allO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/phne8x3hgopzgj1e7o6h.png" alt="Sample data response"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to avoid the common &lt;code&gt;Uncaught TypeError&lt;/code&gt; and get the value of &lt;code&gt;id&lt;/code&gt; from the response above, we need to do some dance in JavaScript. The way we approach this today is by checking the truthiness of the object at each depth as we work our way to &lt;code&gt;id&lt;/code&gt;. This pattern looks more like a conditional statement that should result in a boolean rather than being a property accessor statement but it is, the cleanest and safest native way we have today.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--m0FK_muC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5dlzlxtq15ptkdub3vxt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--m0FK_muC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5dlzlxtq15ptkdub3vxt.png" alt="How we access property values today"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Or if you prefer object destructuring:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cYTJ1gxI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/vd1tvlso21387nyw7pyq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cYTJ1gxI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/vd1tvlso21387nyw7pyq.png" alt="Accessing property values by deconstructing objects"&gt;&lt;/a&gt;&lt;br&gt;
Basically what is happening here is the code block on the left side of the &lt;code&gt;&amp;amp;&amp;amp;&lt;/code&gt; Logical and operator is being evaluated similar to &lt;code&gt;Boolean(data)&lt;/code&gt; and if the value is &lt;code&gt;true&lt;/code&gt; it moves to evaluate the right side.&lt;/p&gt;

&lt;p&gt;There are more ergonomic ways of doing this if you use Lodash or Ember&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pkR8KIli--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/o9fsrkwno0mrw9khpr8d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pkR8KIli--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/o9fsrkwno0mrw9khpr8d.png" alt="Using lodash.get or EmberObject.get"&gt;&lt;/a&gt;&lt;br&gt;
So how do we do the same thing using the new Optional Chaining?&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a5IpggsX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6v1g2b3wstbqj8apr1im.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a5IpggsX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6v1g2b3wstbqj8apr1im.png" alt="Accessing property values using Optional Chaining"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Null Coalescing
&lt;/h2&gt;

&lt;p&gt;It is common practice to have a default value when the value of the property we access is &lt;code&gt;null&lt;/code&gt; or &lt;code&gt;undefined&lt;/code&gt;. Currently the common way to accomplish this is by using the &lt;code&gt;||&lt;/code&gt; Logical or operator&lt;/p&gt;

&lt;p&gt;If we are looking to get the Github username which is the &lt;code&gt;login&lt;/code&gt; property and set a default to the current user's username, &lt;code&gt;sedighian&lt;/code&gt; in this case, we will do so as below:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JJbYV_yO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/j5dxj8sko64un0kutlec.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JJbYV_yO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/j5dxj8sko64un0kutlec.png" alt="Setting default/fallback value three different ways"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;the second and third examples look very similar so why is Null Coalescing useful? Simply put Null Coalescing evaluates the right side of the &lt;code&gt;??&lt;/code&gt; operator only if the result of the left side is &lt;code&gt;undefined&lt;/code&gt; or &lt;code&gt;null&lt;/code&gt; and this gives us some protection against unintended results when dealing with valid but falsy values in our data.&lt;/p&gt;

&lt;p&gt;For example, in many cases, we wish to an empty string &lt;code&gt;''&lt;/code&gt; , &lt;code&gt;false&lt;/code&gt; and &lt;code&gt;0&lt;/code&gt; to the value returned rather than resulting in a falsy value and hence moving to evaluate the right side of the &lt;code&gt;||&lt;/code&gt; Logical-or-operator. Now, we can use the Null Coalescing and we will not have these issues any longer as seen in the examples below:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QEU1j28w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/scty3t4dk9s8b6380bmy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QEU1j28w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/scty3t4dk9s8b6380bmy.png" alt="Why falsy values are bad for Logical or operator and we should use Null Coalescing"&gt;&lt;/a&gt;&lt;br&gt;
For coming up with fallback/default values when accessing an object there are alternative ways in the form of third party libraries and in Ember's case a built-in utility.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nSCqgiVR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/gl81fcl85r4u6btx70zd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nSCqgiVR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/gl81fcl85r4u6btx70zd.png" alt="Using lodash.get or EmberObject.getWithDefault"&gt;&lt;/a&gt;&lt;br&gt;
Do not forget that Null Coalescing is for more than coming up with a default value to assign to a variable, it is a new alternative way to execute a code block given a &lt;code&gt;null&lt;/code&gt; or &lt;code&gt;undefined&lt;/code&gt; value. For example:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---eyFV5cA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/r2jzd820sia6rqim89cw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---eyFV5cA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/r2jzd820sia6rqim89cw.png" alt="executing the right side of Null Coalescing operator"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What to watch out for...
&lt;/h2&gt;

&lt;p&gt;Order matters when using &lt;code&gt;?&lt;/code&gt; in Optional Chaining&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OOeNfkFO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/5j5h0y4nrlgb4yii4qil.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OOeNfkFO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/5j5h0y4nrlgb4yii4qil.png" alt="Order of the ? matters otherwise you will get SyntaxError"&gt;&lt;/a&gt;&lt;br&gt;
Optional Chaining does not protect you against incorrectly invoking a non-function&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LwTst2l_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/3807hb6ifs07ewr8lv98.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LwTst2l_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/3807hb6ifs07ewr8lv98.png" alt="Still need to watch out for Uncaught TypeError not a function"&gt;&lt;/a&gt;&lt;br&gt;
Null Coalescing is not an apple to apple to &lt;code&gt;lodash.get&lt;/code&gt; or &lt;code&gt;EmberObject.getWithDefault&lt;/code&gt;. The main difference is in how Null Coalescing treats &lt;code&gt;null&lt;/code&gt; vs. these two utilities.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kwvVu_Eg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/i0libfj16x5l60dxakcd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kwvVu_Eg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/i0libfj16x5l60dxakcd.png" alt="default value gotcha when using Null Coalescing"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Resources
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html"&gt;TypeScript 3.7 release notes&lt;/a&gt;&lt;br&gt;
&lt;a href="https://babeljs.io/blog/2020/01/11/7.8.0"&gt;Babel 7.8.0 Release notes&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/TC39/proposal-optional-chaining"&gt;Optional Chaining for JavaScript Proposal&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/tc39/proposal-nullish-coalescing"&gt;Nullish Coalescing for JavaScript Proposal&lt;/a&gt;&lt;br&gt;
&lt;a href="https://lodash.com/docs/4.17.15#get"&gt;lodash.get&lt;/a&gt;&lt;br&gt;
&lt;a href="http://api.emberjs.com/ember/3.15/functions/@ember%2Fobject/get"&gt;EmberObject.get&lt;/a&gt;&lt;br&gt;
&lt;a href="http://api.emberjs.com/ember/3.15/functions/@ember%2Fobject/getWithDefault"&gt;EmberObject.getWithDefault&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>ember</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
