<?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: vishwa v</title>
    <description>The latest articles on DEV Community by vishwa v (@vishwa_v_04111c0586f440b6).</description>
    <link>https://dev.to/vishwa_v_04111c0586f440b6</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3958528%2F34410a54-341f-4dac-a152-9f2e78711d8d.jpeg</url>
      <title>DEV Community: vishwa v</title>
      <link>https://dev.to/vishwa_v_04111c0586f440b6</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vishwa_v_04111c0586f440b6"/>
    <language>en</language>
    <item>
      <title>object(remaining topics)</title>
      <dc:creator>vishwa v</dc:creator>
      <pubDate>Tue, 14 Jul 2026 13:46:00 +0000</pubDate>
      <link>https://dev.to/vishwa_v_04111c0586f440b6/objectremaining-topics-5g13</link>
      <guid>https://dev.to/vishwa_v_04111c0586f440b6/objectremaining-topics-5g13</guid>
      <description>&lt;p&gt;&lt;strong&gt;JavaScript Properties&lt;/strong&gt;&lt;br&gt;
You can access object properties in these ways:&lt;/p&gt;

&lt;p&gt;Dot notation&lt;br&gt;
Bracket notation&lt;br&gt;
Expression&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dot Notation&lt;/strong&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="nx"&gt;objectName&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;propertyName&lt;/span&gt;
&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;firstname&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; is &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Bracket Notation&lt;/strong&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="nx"&gt;objectName&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;propertyName&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firstname&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; is &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;age&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In general, dot notation is preferred for readability and simplicity.&lt;/p&gt;

&lt;p&gt;Bracket notation is necessary in some cases:&lt;/p&gt;

&lt;p&gt;The property name is stored in a variable:&lt;br&gt;
person[myVariable]&lt;/p&gt;

&lt;p&gt;The property name is not a valid identifier:&lt;br&gt;
person["last-name"]&lt;/p&gt;

&lt;p&gt;Bracket notation is useful when the property name is stored in a variable:&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;let&lt;/span&gt; &lt;span class="nx"&gt;n1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;firstName&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;n2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;lastName&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;n2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;n2&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Constructor&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It called automatically when object is created.&lt;/p&gt;

&lt;p&gt;the name should be start with uppercase.&lt;/p&gt;

&lt;p&gt;Initializing object specfic value.&lt;/p&gt;

&lt;p&gt;THIS refer to current object&lt;/p&gt;

&lt;p&gt;(.) is differentiate value and object&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Document&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hp&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Laptop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;40000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hp&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;512&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;lenova&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Laptop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;50000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;lenova&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1000&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;asus&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Laptop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;asus&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;262&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

        &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Laptop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;brand&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;storage&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="nx"&gt;price&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;price&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="nx"&gt;brand&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;brand&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="nx"&gt;storage&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;storage&lt;/span&gt;&lt;span class="p"&gt;;&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;lenova&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hp&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;asus&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CRUD operations in JavaScript Objects&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create (Add new property)&lt;/strong&gt;&lt;br&gt;
You can create an object or add new properties to an existing object.&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;// Create object using literal&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;student&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Saran&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;age&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;21&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="c1"&gt;// Add new property&lt;/span&gt;
&lt;span class="nx"&gt;student&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;course&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Web Development&lt;/span&gt;&lt;span class="dl"&gt;"&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;student&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;span class="c1"&gt;// { name: "Saran", age: 21, course: "Web Development" }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Read (Access property values)&lt;/strong&gt;&lt;br&gt;
You can read values using dot notation or bracket notation.&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;student&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;       &lt;span class="c1"&gt;// Dot notation → "Saran"&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;student&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;course&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt;  &lt;span class="c1"&gt;// Bracket notation → "Web&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3. Update (Modify property values)&lt;/strong&gt;&lt;br&gt;
Update existing properties by reassigning values.&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="nx"&gt;student&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;22&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="nx"&gt;student&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;course&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;JavaScript&lt;/span&gt;&lt;span class="dl"&gt;"&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;student&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;span class="c1"&gt;// { name: "Saran", age: 22, course: "JavaScript" }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4. Delete (Remove property)&lt;/strong&gt;&lt;br&gt;
Use the delete keyword to remove properties.&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;delete&lt;/span&gt; &lt;span class="nx"&gt;student&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;course&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;student&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; 
&lt;span class="c1"&gt;// { name: "Saran", age: 22 }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>object-2</title>
      <dc:creator>vishwa v</dc:creator>
      <pubDate>Mon, 13 Jul 2026 16:19:22 +0000</pubDate>
      <link>https://dev.to/vishwa_v_04111c0586f440b6/object-39b1</link>
      <guid>https://dev.to/vishwa_v_04111c0586f440b6/object-39b1</guid>
      <description>&lt;p&gt;&lt;strong&gt;JavaScript Object Methods&lt;/strong&gt;&lt;br&gt;
Objects can also have methods.&lt;/p&gt;

&lt;p&gt;Object methods are actions that can be performed on objects.&lt;/p&gt;

&lt;p&gt;Object methods are function definitions stored as property &lt;br&gt;
values:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Document&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mobile1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Nothing&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;35000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;storage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;126&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;browse&lt;/span&gt;&lt;span class="p"&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;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;4g speed&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="p"&gt;}&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mobile2&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;vivo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;25000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;storage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;256&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="na"&gt;browse&lt;/span&gt;&lt;span class="p"&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;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;5g speed&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="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;mobile1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browse&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="nx"&gt;mobile2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;browse&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mobile1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In an object method, this refers to the object.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Javascript(object)</title>
      <dc:creator>vishwa v</dc:creator>
      <pubDate>Sun, 12 Jul 2026 13:20:41 +0000</pubDate>
      <link>https://dev.to/vishwa_v_04111c0586f440b6/object-2bod</link>
      <guid>https://dev.to/vishwa_v_04111c0586f440b6/object-2bod</guid>
      <description>&lt;p&gt;&lt;strong&gt;Intro&lt;/strong&gt;&lt;br&gt;
Objects are variables that can store both values and functions.&lt;/p&gt;

&lt;p&gt;Values are stored as key:value pairs called properties.&lt;/p&gt;

&lt;p&gt;Functions are stored as key:function() pairs called methods&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Object Example&lt;/strong&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;car&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Fiat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;500&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;white&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;An object literal "literally" describes an object using a concise syntax with zero or more key:value pairs inside curly braces to describe all the object properties:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="err"&gt;firstName:&lt;/span&gt;&lt;span class="s2"&gt;"John"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;lastName:&lt;/span&gt;&lt;span class="s2"&gt;"Doe"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;age:&lt;/span&gt;&lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;eyeColor:&lt;/span&gt;&lt;span class="s2"&gt;"blue"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Function(expression,arrow)</title>
      <dc:creator>vishwa v</dc:creator>
      <pubDate>Fri, 10 Jul 2026 10:48:14 +0000</pubDate>
      <link>https://dev.to/vishwa_v_04111c0586f440b6/functionexpressionarrow-1bca</link>
      <guid>https://dev.to/vishwa_v_04111c0586f440b6/functionexpressionarrow-1bca</guid>
      <description>&lt;p&gt;What is a Function Expression?&lt;br&gt;
A function expression is a function stored in a variable.&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;// Standard Function&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;multiply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&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;a&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Function Expression&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;multiply&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;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&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;a&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;b&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;&lt;strong&gt;Anonymous Functions&lt;/strong&gt;&lt;br&gt;
Function expressions are commonly used to create anonymous functions.&lt;/p&gt;

&lt;p&gt;The function above is actually function without a name.&lt;/p&gt;

&lt;p&gt;Functions stored in variables do not need names.&lt;/p&gt;

&lt;p&gt;The variable name is used to call the function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Functions vs. Function Expressions&lt;/strong&gt;&lt;br&gt;
JavaScript functions are defined with the function keyword.&lt;/p&gt;

&lt;p&gt;JavaScript functions can be defined in different ways.&lt;/p&gt;

&lt;p&gt;In JavaScript, function declarations and function expression refer to different ways of defining functions, their different syntax and how they are handled:&lt;/p&gt;

&lt;p&gt;They both work the same when you call them.&lt;/p&gt;

&lt;p&gt;The difference is when they become available in your code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hoisting&lt;/strong&gt;&lt;br&gt;
Function declarations can be called before they are defined.&lt;/p&gt;

&lt;p&gt;Function expressions can not be called before they are defined.&lt;/p&gt;

&lt;p&gt;Function declarations are "hoisted" to the top of their scope. This means you can call a function before it is defined in the code:&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;let&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;add&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="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// Will work&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&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;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Function expressions are not hoisted in the same way as function declarations.&lt;/p&gt;

&lt;p&gt;They are created when the execution reaches their definition, and cannot be called before that point:&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;let&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;add&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="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// ⛔ Will generate error&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;add&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;function &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&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;a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;JavaScript Arrow Functions&lt;/strong&gt;&lt;br&gt;
Arrow Functions allow a shorter syntax for function expressions.&lt;/p&gt;

&lt;p&gt;You can skip the function keyword, the return keyword, and the curly brackets:&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;multiply&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;If the function body contains only one statement:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can remove the word function, the curly brackets and the return keyword.&lt;/p&gt;

&lt;p&gt;Arrow functions are not hoisted.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Javascript (Function)</title>
      <dc:creator>vishwa v</dc:creator>
      <pubDate>Thu, 09 Jul 2026 13:39:30 +0000</pubDate>
      <link>https://dev.to/vishwa_v_04111c0586f440b6/function-5g8l</link>
      <guid>https://dev.to/vishwa_v_04111c0586f440b6/function-5g8l</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
Functions are reusable code blocks designed to perform a particular task.&lt;/p&gt;

&lt;p&gt;Functions are executed when they are called or invoked.&lt;/p&gt;

&lt;p&gt;Functions are fundamental in all programming languages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Functions are defined with the function keyword:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;followed by the function name&lt;/p&gt;

&lt;p&gt;followed by parentheses ( )&lt;/p&gt;

&lt;p&gt;followed by brackets { }&lt;/p&gt;

&lt;p&gt;The function name follows the naming rules for variables.&lt;/p&gt;

&lt;p&gt;Optional parameters are listed inside parentheses: ( p1, p2, ... )&lt;/p&gt;

&lt;p&gt;Code to be executed is listed inside curly brackets: { }&lt;/p&gt;

&lt;p&gt;Functions can return an optional value back to the caller.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Local Variables&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Variables declared within a JavaScript function, become LOCAL to the function.&lt;/p&gt;

&lt;p&gt;Local variables can only be accessed from within the function.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why Functions?&lt;/strong&gt;&lt;br&gt;
Functions enable better code organization and efficiency.&lt;/p&gt;

&lt;p&gt;With functions you can reuse the same code many times.&lt;/p&gt;

&lt;p&gt;The same code, with different input, can produce different results.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Invoking JavaScript Functions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A JavaScript function runs when it is called.&lt;/p&gt;

&lt;p&gt;To call a function, write the name followed by parentheses like name().&lt;/p&gt;

&lt;p&gt;Example:&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;function&lt;/span&gt; &lt;span class="nf"&gt;sayHello&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello World&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;sayHello&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Calling vs Referencing a Function&lt;/strong&gt;&lt;br&gt;
This is an important difference:&lt;/p&gt;

&lt;p&gt;sayHello refers to the function itself. It returns the function.&lt;/p&gt;

&lt;p&gt;sayHello() refers to the function result. It returns the result.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Function Return&lt;/strong&gt;&lt;br&gt;
A function can return a value back to the code that called it.&lt;/p&gt;

&lt;p&gt;The return statement is used to send a value out of a function&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Function Parameters&lt;/strong&gt;&lt;br&gt;
Parameters allow you to pass (send) values to a function.&lt;/p&gt;

&lt;p&gt;Parameters are listed inside the parentheses in the function definition.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Functions with One Parameter&lt;/strong&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;function&lt;/span&gt; &lt;span class="nf"&gt;sayHello&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Hello &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;sayHello&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;John&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Functions with Multiple Parameters&lt;/strong&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;function&lt;/span&gt; &lt;span class="nf"&gt;fullName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;lastName&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;firstName&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;fullName&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;John&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Doe&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;JavaScript Function Arguments&lt;/strong&gt;&lt;br&gt;
Parameters vs. Arguments&lt;br&gt;
In JavaScript, function parameters and arguments are distinct concepts:&lt;/p&gt;

&lt;p&gt;Parameters are the names listed in the function definition.&lt;/p&gt;

&lt;p&gt;Arguments are the real values passed to, and received by the function.&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;function&lt;/span&gt; &lt;span class="nf"&gt;multiply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&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;a&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;multiply&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="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this&lt;br&gt;
a and b are parameters&lt;br&gt;
4 and 5 are arguments&lt;br&gt;
The argument 4 is assigned to the parameter a.&lt;/p&gt;

&lt;p&gt;The argument 5 is assigned to the parameter b&lt;/p&gt;

</description>
    </item>
    <item>
      <title>For loop</title>
      <dc:creator>vishwa v</dc:creator>
      <pubDate>Wed, 08 Jul 2026 14:20:04 +0000</pubDate>
      <link>https://dev.to/vishwa_v_04111c0586f440b6/for-loop-5e5a</link>
      <guid>https://dev.to/vishwa_v_04111c0586f440b6/for-loop-5e5a</guid>
      <description>&lt;p&gt;For Loops can execute a block of code a number of times.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&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="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;do&lt;/strong&gt;&lt;br&gt;
The do while loop is a variant of the while loop. This loop will execute the code block once, before checking if the condition is true, then it will repeat the loop as long as the condition is true&lt;/p&gt;

</description>
    </item>
    <item>
      <title>While Loop</title>
      <dc:creator>vishwa v</dc:creator>
      <pubDate>Tue, 07 Jul 2026 15:22:33 +0000</pubDate>
      <link>https://dev.to/vishwa_v_04111c0586f440b6/while-loop-9b3</link>
      <guid>https://dev.to/vishwa_v_04111c0586f440b6/while-loop-9b3</guid>
      <description>&lt;p&gt;The while loop loops through a block of code as long as a specified condition is true.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"UTF-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Document&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&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="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;=&lt;/span&gt;&lt;span class="mi"&gt;5&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nx"&gt;j&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;k&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;k&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;=&lt;/span&gt;&lt;span class="mi"&gt;10&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="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;k&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nx"&gt;k&lt;/span&gt;&lt;span class="o"&gt;+=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;q&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;q&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;=&lt;/span&gt;&lt;span class="mi"&gt;15&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="nx"&gt;q&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;3&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;q&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;q&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;



    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;=&lt;/span&gt;&lt;span class="mi"&gt;50&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="nx"&gt;m&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;5&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;l&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;l&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;=&lt;/span&gt;&lt;span class="mi"&gt;50&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="nx"&gt;l&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nx"&gt;l&lt;/span&gt;&lt;span class="o"&gt;%&lt;/span&gt;&lt;span class="mi"&gt;5&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;l&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;l&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Contitional Property</title>
      <dc:creator>vishwa v</dc:creator>
      <pubDate>Mon, 06 Jul 2026 16:20:36 +0000</pubDate>
      <link>https://dev.to/vishwa_v_04111c0586f440b6/contitional-property-2dl1</link>
      <guid>https://dev.to/vishwa_v_04111c0586f440b6/contitional-property-2dl1</guid>
      <description>&lt;p&gt;&lt;strong&gt;JavaScript if&lt;/strong&gt;&lt;br&gt;
Use the JavaScript if statement to execute a block of code when a condition is true.&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;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hour&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;greeting&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Good day&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Nested if&lt;/strong&gt;&lt;br&gt;
You can use an if statement inside another if statement:&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;let&lt;/span&gt; &lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;country&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;USA&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;You can Not drive!&lt;/span&gt;&lt;span class="dl"&gt;"&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="nx"&gt;country&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;USA&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;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;You can drive!&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The else Statement&lt;/strong&gt;&lt;br&gt;
Use the else statement to specify a block of code to be executed if a condition is false.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Ternary Operator&lt;/strong&gt;&lt;br&gt;
The conditional operator is a shorthand for writing conditional if...else statements.&lt;/p&gt;

&lt;p&gt;It is called a ternary operator because it takes three operands.&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;let&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Minor&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Adult&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;JavaScript Switch Statement&lt;/strong&gt;&lt;br&gt;
switch is often used as a more readable alternative to many if...else if...else statements, especially when dealing with multiple possible values.&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;switch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;getDay&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nx"&gt;day&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Sunday&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nx"&gt;day&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Monday&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
     &lt;span class="nx"&gt;day&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Tuesday&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;case&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;day&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Wednesday&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;break&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 JavaScript reaches a break keyword, it breaks out of the switch block.&lt;br&gt;
This will stop the execution inside the switch block.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The default Keyword&lt;/strong&gt;&lt;br&gt;
The default keyword specifies a block of code to run if there is no case match.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Booleans&lt;/strong&gt;&lt;br&gt;
In JavaScript, a Boolean is a primitive data type that can only have one of two values:&lt;/p&gt;

&lt;p&gt;true or false&lt;/p&gt;

&lt;p&gt;The Boolean value of an expression is the basis for all JavaScript comparisons and conditions.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>CSS (property</title>
      <dc:creator>vishwa v</dc:creator>
      <pubDate>Sun, 05 Jul 2026 07:57:45 +0000</pubDate>
      <link>https://dev.to/vishwa_v_04111c0586f440b6/css-property-3nah</link>
      <guid>https://dev.to/vishwa_v_04111c0586f440b6/css-property-3nah</guid>
      <description>&lt;p&gt;&lt;strong&gt;1.Z-index&lt;/strong&gt;&lt;br&gt;
The z-index property specifies the stack order of positioned elements.&lt;/p&gt;

&lt;p&gt;The stack order defines which element should be placed in front or behind other elements.&lt;/p&gt;

&lt;p&gt;When elements are positioned, they can overlap other elements.&lt;/p&gt;

&lt;p&gt;An element can have a positive or negative stack order (z-index):&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;style&amp;gt;
img {
  position: absolute;
  left: 0px;
  top: 0px;
  z-index: -1;
}
&amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;

&amp;lt;h1&amp;gt;This is a heading&amp;lt;/h1&amp;gt;
&amp;lt;img src="img_tree.png"&amp;gt;
&amp;lt;p&amp;gt;Because the image has a z-index of -1, it will be placed behind the text.&amp;lt;/p&amp;gt;

&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2m4emk8ntdr70cu942wp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F2m4emk8ntdr70cu942wp.png" alt=" " width="478" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2.overflow&lt;/strong&gt;&lt;br&gt;
The CSS overflow property controls what happens to content that is too big to fit into an area.&lt;/p&gt;

&lt;p&gt;It specifies whether to clip the content or to add scrollbars when the content of an element is too big.&lt;/p&gt;

&lt;p&gt;The overflow property has the following values:&lt;/p&gt;

&lt;p&gt;visible - Default. The overflow is not clipped. The content renders outside the element's box&lt;br&gt;
hidden - The overflow is clipped, and the rest of the content is hidden&lt;br&gt;
scroll - Scrollbars are added. User must scroll to see all content&lt;br&gt;
auto - Similar to scroll, but adds scrollbars only when necessary&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div {
  width: 200px;
  height: 65px;
  background-color: coral;
  overflow: visible;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3.float&lt;/strong&gt;&lt;br&gt;
The float property specifies how an element should float within its container.&lt;/p&gt;

&lt;p&gt;It places an element on the left or right side of its container, allowing text and inline elements to wrap around it.&lt;/p&gt;

&lt;p&gt;The float property can have one of the following values:&lt;/p&gt;

&lt;p&gt;left - The element floats to the left of its container&lt;br&gt;
right - The element floats to the right of its container&lt;br&gt;
none - Default. The element does not float and is displayed just where it occurs in the text&lt;br&gt;
inherit - The element inherits the float value of its parent&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;img {
  float: left;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS @keyframes Rule&lt;/strong&gt;&lt;br&gt;
Rule is used to control the steps in an animation sequence by defining CSS styles for points along the animation sequence.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@keyframes mymove {
  0%   {top: 0px;}
  25%  {top: 200px;}
  50%  {top: 100px;}
  75%  {top: 200px;}
  100% {top: 0px;}
}
   OR

div {
  width: 100px;
  height: 100px;
  background: red;
  position: relative;
  animation: mymove 5s infinite;
}

@keyframes mymove {
  0%   {top: 0px; left: 0px; background: red;}
  25%  {top: 0px; left: 100px; background: blue;}
  50%  {top: 100px; left: 100px; background: yellow;}
  75%  {top: 100px; left: 0px; background: green;}
  100% {top: 0px; left: 0px; background: red;}
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS &lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt; Rule&lt;/strong&gt;&lt;br&gt;
The CSS &lt;a class="mentioned-user" href="https://dev.to/media"&gt;@media&lt;/a&gt; rule is used in media queries to apply different styles for different media types/devices.&lt;/p&gt;

&lt;p&gt;Media queries can be used to check many things, such as:&lt;/p&gt;

&lt;p&gt;width and height of the viewport&lt;br&gt;
width and height of the device&lt;br&gt;
orientation (is the tablet/phone in landscape or portrait mode?)&lt;br&gt;
resolution&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;body {
  background-color: lightblue;
}

@media screen and (min-width: 400px) {
  body {
    background-color: lightgreen;
  }
}

@media screen and (min-width: 800px) {
  body {
    background-color: lavender;
  }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CSS animation Property&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div {
  animation: mymove 5s infinite;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The animation property is a shorthand property for:&lt;/p&gt;

&lt;p&gt;animation-name&lt;br&gt;
animation-duration&lt;br&gt;
animation-timing-function&lt;br&gt;
animation-delay&lt;br&gt;
animation-iteration-count&lt;br&gt;
animation-direction&lt;br&gt;
animation-fill-mode&lt;br&gt;
animation-play-state&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CSS opacity Property&lt;/strong&gt;&lt;br&gt;
The opacity property sets the opacity level for an element.&lt;/p&gt;

&lt;p&gt;The opacity-level describes the transparency-level, where 1 is not transparent at all, 0.5 is 50% see-through, and 0 is completely transparent&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;div {
  opacity: 0.5;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Library management system</title>
      <dc:creator>vishwa v</dc:creator>
      <pubDate>Sun, 05 Jul 2026 07:15:40 +0000</pubDate>
      <link>https://dev.to/vishwa_v_04111c0586f440b6/library-management-system-71n</link>
      <guid>https://dev.to/vishwa_v_04111c0586f440b6/library-management-system-71n</guid>
      <description>&lt;p&gt;"I built a Library Management System — a web application that lets an admin manage books, members, and track book issue/return transactions."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Mention the tech stack (shows technical depth)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"I used Java with Spring Boot for the backend, MySQL as the database, Thymeleaf for rendering the frontend pages, and JavaScript for form validation and live search."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Explain the architecture (shows you understand structure, not just code)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"I followed the MVC pattern — Spring Data JPA handles communication with MySQL, the Controller layer processes requests and business logic, and Thymeleaf renders the final HTML that's sent to the browser. This is server-side rendering, meaning the backend builds the complete page before sending it, rather than using a separate frontend framework like React."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Walk through the core features&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"The system has three main entities — Books, Members, and Transactions. An admin can add, edit, or delete books, register members, and issue or return books. When a book is issued, the system checks if copies are available, decreases the count, and creates a transaction record linking that book and member. When it's returned, the available count goes back up and the transaction is marked complete."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Mention the database design (common follow-up question)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"I used three related tables — books, members, and transactions — with transactions acting as a linking table using foreign keys. I chose MySQL over something like MongoDB because the data has clear relationships that a relational database handles naturally."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Mention a challenge you solved (this is what interviewers actually want to hear)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"One thing I had to handle carefully was preventing a book from being issued when there are zero available copies — so I added a check in the service layer before allowing the transaction to go through."&lt;/p&gt;

&lt;p&gt;(Once you actually build it, replace this with a REAL challenge you personally hit and fixed — interviewers can tell when this is rehearsed vs. real.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. Close with what you learned/took away&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"This project helped me understand full-stack development end-to-end — from database design and backend logic to connecting it with a working frontend."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;what is thymeleaf&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"I used Thymeleaf for server-side rendering — my Spring Boot backend fetches data from MySQL and builds the complete HTML page before sending it to the browser, rather than using a separate frontend framework that calls a REST API."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem Statement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;"Many small libraries — like college department libraries or community libraries — still manage book records, member details, and issue/return activity manually using registers or spreadsheets. This leads to several issues:&lt;/p&gt;

&lt;p&gt;No easy way to check if a book is available without physically searching&lt;br&gt;
Difficult to track which member currently has which book, and since when&lt;br&gt;
No system to prevent issuing a book that has zero copies left&lt;br&gt;
Manual searching is slow, especially as the number of books grows&lt;br&gt;
Risk of human error — lost records, incorrect entries, no backup&lt;/p&gt;

&lt;p&gt;The Library Management System solves this by digitizing the entire process — providing a centralized system where an admin can manage books, register members, and track issue/return transactions accurately and efficiently, eliminating manual record-keeping."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Que&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Why Spring Boot?&lt;/strong&gt;&lt;br&gt;
Spring Boot is a popular Java tool that makes backend coding faster and easier. It handles a lot of setup work automatically, so I write less code and focus on the actual features.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. What is MVC?&lt;/strong&gt;&lt;br&gt;
MVC splits the project into 3 parts so things stay organized:&lt;/p&gt;

&lt;p&gt;Model = the data (Book, Member, Transaction)&lt;br&gt;
View = what the user sees (the HTML pages)&lt;br&gt;
Controller = the middleman that connects the two&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Why is transactions a separate table?&lt;/strong&gt;&lt;br&gt;
Because one book can be issued and returned many times by different people. If I stored that info inside the books table, I'd lose the old history every time. A separate table keeps a full record of every issue/return event.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. How does Spring Data JPA help?&lt;/strong&gt;&lt;br&gt;
Normally you'd have to write SQL yourself to get data from MySQL. With Spring Data JPA, I just write a simple Java method name like findByAuthor, and it automatically creates the SQL for me. Less code, fewer mistakes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. The tricky part&lt;/strong&gt; — let me explain this one simply first:&lt;br&gt;
The problem: Imagine a book has 0 copies left, but the system still allows someone to issue it. That's wrong — you can't lend a book that isn't available.&lt;br&gt;
The fix: Before issuing any book, the system checks: "Does this book have at least 1 copy available?"&lt;/p&gt;

&lt;p&gt;If yes → allow the issue, reduce the count by 1&lt;br&gt;
If no → block it and show an error like "No copies available"&lt;/p&gt;

&lt;p&gt;Why this is "tricky": It's not enough to just hide the "Issue" button on the webpage — a smart user could still try to force the request another way. So the check has to happen in the backend (the real brain of the app), not just the frontend (what the user sees). That way, the rule is actually enforced, not just visually hidden.&lt;br&gt;
Simple way to say this in an interview:&lt;/p&gt;

&lt;p&gt;"I made sure a book can't be issued if there are zero copies left. I added this check on the backend, not just the frontend, so the rule can't be bypassed."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;diff&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Thymeleaf → If you want the backend to generate complete HTML pages (classic MVC apps).&lt;/p&gt;

&lt;p&gt;REST → If you want the backend to serve raw data for multiple clients (web, mobile, etc.).&lt;/p&gt;

&lt;p&gt;Fetch API → If your frontend (browser) needs to call REST endpoints and dynamically update the UI.&lt;/p&gt;

&lt;p&gt;In short: Thymeleaf = server-side views, REST = backend APIs, Fetch = client-side calls to APIs.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>mock interview-2(medigpt)</title>
      <dc:creator>vishwa v</dc:creator>
      <pubDate>Sat, 04 Jul 2026 15:55:27 +0000</pubDate>
      <link>https://dev.to/vishwa_v_04111c0586f440b6/mock-interview-2-59ap</link>
      <guid>https://dev.to/vishwa_v_04111c0586f440b6/mock-interview-2-59ap</guid>
      <description>&lt;p&gt;&lt;strong&gt;How did you reduce Hallucination?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hallucination was reduced using Fact-Grounded Distillation Objective (FGDO).&lt;/p&gt;

&lt;p&gt;Standard models optimize for fluent text only.&lt;/p&gt;

&lt;p&gt;FGDO adds a penalty when generated facts contradict or aren’t supported by UMLS (a trusted medical knowledge base).&lt;/p&gt;

&lt;p&gt;This forces the model to prefer factually grounded outputs over plausible-sounding but false ones.&lt;/p&gt;

&lt;p&gt;As a result, it achieved higher factual accuracy than BioGPT and GPT-Neo.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is Hallucination?&lt;/strong&gt;&lt;br&gt;
AI models sometimes make up medical facts confidently — called hallucination. In healthcare, a wrong fact can literally harm someone. So your project's goal: build a medical AI that doesn't lie.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is fine-tuning here?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After MediGPT is pre-trained (decoder-only, GPT-style, on the biomedical corpus), it goes through supervised fine-tuning using FGDO — this is the stage where the dual-loss (cross-entropy + factual loss) is applied, using AdamW optimizer, a warmup + cosine decay learning rate schedule, gradient clipping, and FP16 mixed-precision training.&lt;/p&gt;

&lt;p&gt;example:&lt;br&gt;
Without FGDO (just fluent text):&lt;br&gt;&lt;br&gt;
"Asthma is caused by eating spicy food."&lt;br&gt;&lt;br&gt;
→ Sounds plausible, but it’s factually wrong.&lt;/p&gt;

&lt;p&gt;With FGDO (fact-grounded via UMLS):&lt;br&gt;&lt;br&gt;
"Asthma is a chronic condition where the airways become inflamed and narrow, often triggered by allergens or exercise."&lt;br&gt;&lt;br&gt;
→ This matches medical knowledge and avoids unsupported claims.&lt;/p&gt;

&lt;p&gt;So FGDO acts like a fact-checking filter during training — penalizing unsupported statements and rewarding medically accurate ones.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vector Database&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stores UMLS facts as embeddings so the system can quickly find the closest matching medical fact to verify what the model said.&lt;/p&gt;

&lt;p&gt;UMLS = Unified Medical Language System, a big trusted database of medical terms, concepts, and relationships (like a giant medical dictionary + knowledge graph). "UML" (no S) is a totally different thing — a software design diagram notation. In your project, you mean UMLS embedding.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is a UMLS embedding?&lt;/strong&gt;&lt;br&gt;
An embedding is just a way of turning text into a list of numbers (a vector) that captures its meaning, not just its spelling. Similar meanings → similar numbers.&lt;/p&gt;

&lt;p&gt;So a UMLS embedding means: taking each medical concept/fact from UMLS (e.g., "Metformin treats Type 2 Diabetes") and converting it into a numerical vector that represents its meaning.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;React&lt;/strong&gt;&lt;br&gt;
A chat-style UI where users type medical questions and get answers with a disclaimer to consult healthcare professionals. React would be the natural choice to build that client-side chat UI — handling message state, rendering conversation history, and making calls (via Fetch API, tying back to your earlier question) to your backend/model API to get responses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GPT — Full form&lt;/strong&gt;&lt;br&gt;
Generative Pre-trained Transformer — and MediGPT's architecture is decoder-only, following this GPT family design, since decoder-only models suit autoregressive generation (ideal for summarization, report generation, medical Q&amp;amp;A).&lt;/p&gt;

&lt;p&gt;MediGPT uses this decoder-only architecture (predicts text word-by-word).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One-liner for interviews:&lt;/strong&gt;&lt;br&gt;
"I built a medical AI and created FGDO — a training method that checks facts against a trusted medical database using vector search, and penalizes the model for wrong answers, making it more reliable than RAG-based or plain fine-tuned models."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Problem&lt;/strong&gt;&lt;br&gt;
AI models sometimes make up medical facts confidently — called hallucination. In healthcare, a wrong fact can literally harm someone. So your project's goal: build a medical AI that doesn't lie.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is MediGPT?&lt;/strong&gt;&lt;br&gt;
A custom AI language model (like ChatGPT, but decoder-only GPT-style architecture) specifically trained for medical/clinical text — answering health questions, summarizing clinical notes, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Data&lt;/strong&gt;&lt;br&gt;
Trained using real medical text:&lt;/p&gt;

&lt;p&gt;PubMed — medical research papers&lt;br&gt;
MIMIC-III/IV — real (anonymized) ICU patient records&lt;br&gt;
UMLS — a trusted medical knowledge base (used to check facts, not as training text)&lt;br&gt;
MedQuAD / MIMIC-IV-Ext-BHC — used to create practice questions during training&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Custom Tokenizer&lt;/strong&gt;&lt;br&gt;
Normal AI models break medical words like "electroencephalogram" into weird chopped-up pieces. You built a custom tokenizer (BPE) trained on medical text so complex terms are understood as single, clean units — more efficient and accurate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Model Architecture&lt;/strong&gt;&lt;br&gt;
Decoder-only Transformer (same family as GPT) — good at generating text step-by-step. Also uses ALiBi, a technique that helps it handle very long clinical documents without losing track of context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: The Big Innovation — FGDO&lt;/strong&gt;&lt;br&gt;
This is your main contribution, and it's how you reduce hallucination:&lt;/p&gt;

&lt;p&gt;Model answers a question&lt;/p&gt;

&lt;p&gt;The answer is broken into small individual facts.&lt;/p&gt;

&lt;p&gt;Each fact is checked against UMLS (using a vector database for similarity search — matching the fact's meaning to trusted medical entries).&lt;/p&gt;

&lt;p&gt;If a fact is false or unverifiable → penalty. If true → no penalty (or reward).&lt;/p&gt;

&lt;p&gt;This penalty ("factual loss") is added to normal training loss, so the model is directly trained to avoid making things up — not just fine-tuned to sound fluent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RAG vs FGDO — the key distinction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;RAG = look up facts at answer-time and hand them to the model as a cheat sheet. Doesn't fix the model itself.&lt;/p&gt;

&lt;p&gt;FGDO = teach the model during training to stop making false claims. Fixes the model's actual behavior.&lt;br&gt;
Your project uses FGDO, not RAG — that's the novel part.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The App&lt;/strong&gt;&lt;br&gt;
A React-based chat interface (like a chatbot) where users ask medical questions and get answers — always with a disclaimer to consult a real doctor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Results&lt;/strong&gt;&lt;br&gt;
Compared to BioGPT and GPT-Neo, MediGPT scored higher on:&lt;/p&gt;

&lt;p&gt;ROUGE-1 &amp;amp; ROUGE-L (text quality/similarity to correct answers)&lt;br&gt;
Factual Accuracy (0.95 vs 0.85 and 0.77)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ethics built in&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Never replaces doctors — just assists ("human-in-the-loop")&lt;br&gt;
Follows HIPAA/GDPR for patient privacy&lt;br&gt;
Flags uncertainty instead of guessing when unsure&lt;br&gt;
Checked for bias across different patient groups&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One-line summary you can say in an interview:&lt;/strong&gt;&lt;br&gt;
"I built a medical AI model and proposed a new training method called FGDO, which checks the model's facts against a trusted medical database during training and penalizes it for wrong information — making it more factually reliable than existing models like BioGPT, without depending on RAG."&lt;/p&gt;

</description>
    </item>
    <item>
      <title>operators</title>
      <dc:creator>vishwa v</dc:creator>
      <pubDate>Fri, 03 Jul 2026 15:46:07 +0000</pubDate>
      <link>https://dev.to/vishwa_v_04111c0586f440b6/operators-369c</link>
      <guid>https://dev.to/vishwa_v_04111c0586f440b6/operators-369c</guid>
      <description></description>
    </item>
  </channel>
</rss>
