<?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: Bang IAS</title>
    <description>The latest articles on DEV Community by Bang IAS (@bangias).</description>
    <link>https://dev.to/bangias</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%2F111920%2F1f45968d-1d77-4e94-a0b9-67ce00803650.jpeg</url>
      <title>DEV Community: Bang IAS</title>
      <link>https://dev.to/bangias</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/bangias"/>
    <language>en</language>
    <item>
      <title>#Beginner Javascript - Calculate The Area Of The Triangle </title>
      <dc:creator>Bang IAS</dc:creator>
      <pubDate>Wed, 19 Aug 2020 14:09:30 +0000</pubDate>
      <link>https://dev.to/bangias/beginner-javascript-calculate-the-area-of-the-triangle-1abe</link>
      <guid>https://dev.to/bangias/beginner-javascript-calculate-the-area-of-the-triangle-1abe</guid>
      <description>&lt;p&gt;I try to share knowledge on how to implement basic math formulas using javascript. I will try with the easiest case, namely by using the formula for the area of a triangle.&lt;/p&gt;

&lt;h3&gt;
  
  
  Formula
&lt;/h3&gt;

&lt;p&gt;The basic formula for the area of a triangle is &lt;em&gt;&lt;strong&gt;1/2 x base x height&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Source Code
&lt;/h3&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;base&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;area&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;base&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="mi"&gt;4&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt; &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;area&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="c1"&gt;//--&amp;gt; 90&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Discussion Of Code Results
&lt;/h3&gt;

&lt;p&gt;The code above consists of 1/2 triangle, base, height and area. each has a value, except for area, because it asks for the area of ​​the triangle.&lt;/p&gt;

&lt;p&gt;The base of the triangle has a value of 12 and the height of the triangle is 15, to calculate this simply enter the area of ​​0.5 and multiply it by the base and height of the triangle.&lt;/p&gt;

&lt;p&gt;Okay maybe that's all I have taught, if the article I made has an error, I'm sorry and if there is input I am very happy to receive it.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
