<?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: Deva I</title>
    <description>The latest articles on DEV Community by Deva I (@deva_i_932c8869ada96d4c9f).</description>
    <link>https://dev.to/deva_i_932c8869ada96d4c9f</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%2F3798144%2F9feab75e-fc8a-4f36-a8cd-6991d3e43de5.png</url>
      <title>DEV Community: Deva I</title>
      <link>https://dev.to/deva_i_932c8869ada96d4c9f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/deva_i_932c8869ada96d4c9f"/>
    <language>en</language>
    <item>
      <title>Detail About These Interview Questions: 1.What is Javascript 2.Data types in Js and Difference Between Primitive and Non Primitive 3.Variable in js</title>
      <dc:creator>Deva I</dc:creator>
      <pubDate>Thu, 09 Apr 2026 16:05:44 +0000</pubDate>
      <link>https://dev.to/deva_i_932c8869ada96d4c9f/detail-about-these-interview-questions-1what-is-javascript-2data-types-in-js-and-difference-3kef</link>
      <guid>https://dev.to/deva_i_932c8869ada96d4c9f/detail-about-these-interview-questions-1what-is-javascript-2data-types-in-js-and-difference-3kef</guid>
      <description>&lt;h2&gt;
  
  
  1.What is Javascript:
&lt;/h2&gt;

&lt;p&gt;◾Java script is a high level programing language that used alongside HTML and CSS.&lt;/p&gt;

&lt;p&gt;◾It's a object oriented programming language.&lt;/p&gt;

&lt;p&gt;◾It is used to define the behaviour of the HTML and CSS,&lt;/p&gt;

&lt;p&gt;◾Java script is a most widely used frontend language in the world wide.&lt;/p&gt;

&lt;p&gt;◾It is used for interact web application and supports both client side and server side development. &lt;/p&gt;

&lt;p&gt;◾Client side means code runs on the user's computer and server side means it's runs on the web browser.&lt;/p&gt;

&lt;p&gt;◾JavaScript is a single-threaded language that executes one task at a time.&lt;/p&gt;

&lt;p&gt;◾Java script was created by BRENDON EICH in 1995.He's a computer programmer and technology executive.&lt;/p&gt;

&lt;p&gt;◾Brendon takes only 10 days to create java script.&lt;/p&gt;

&lt;p&gt;◾Java script mainly used browsers,not only browser also on servers, mobile apps and AI tools.&lt;/p&gt;

&lt;p&gt;1.Why this language has the name of Java script?&lt;/p&gt;

&lt;p&gt;✓ In the initial stage it was named by "MOCHA" and later renamed "LIVE SCRIPT"&lt;/p&gt;

&lt;p&gt;✓ Then they conclude the popularity of JAVA language at the time,so its inspired JAVA language to renamed "JAVA SCRIPT".&lt;/p&gt;

&lt;p&gt;2.Why java script is a scripting language?&lt;/p&gt;

&lt;p&gt;✓ Java script does not need any compiler to run this code,they run on runtime browsers&lt;/p&gt;

&lt;p&gt;✓ It is interpreted line by line execution.&lt;/p&gt;

&lt;p&gt;✓ Example Java code need a compiler to read the code to machine language(binary) and then to compiled servers,but javascript does not need compilers to convert machine language they directly runs on browsers.&lt;/p&gt;

&lt;p&gt;✓ Python is one of the most popular  scripting languages. Known for its simple syntax and readability&lt;/p&gt;

&lt;h2&gt;
  
  
  2.What are the data types are in javascript?
&lt;/h2&gt;

&lt;p&gt;∆ Data types are two types,they are&lt;br&gt;
1.primitive data type&lt;br&gt;
2.non primitive data type&lt;/p&gt;

&lt;p&gt;∆ Javascript using 8 primitive data types,they are Number,Boolean, Bigint,String, Undefined,Null,Nan and Symbol.&lt;/p&gt;

&lt;p&gt;Number:&lt;br&gt;
✓ Its using to denote numbers like&lt;br&gt;
Ex:19,12,4,2&lt;/p&gt;

&lt;p&gt;Boolean:&lt;br&gt;
✓ boolean denoted by true or false.&lt;/p&gt;

&lt;p&gt;Bigint:&lt;br&gt;
✓ Normally integer values are number,on the other hand bigint means big numbers.&lt;br&gt;
Ex:2527788373782,2773993736.&lt;/p&gt;

&lt;p&gt;String:&lt;br&gt;
✓ Strings are set of characters enclosed single''or double""quotes.&lt;br&gt;
Ex:"Deva",'blog'.&lt;/p&gt;

&lt;p&gt;Undefined:&lt;br&gt;
✓ Undefined is variable can be exist but not value assigned&lt;/p&gt;

&lt;p&gt;Null:&lt;br&gt;
✓ Null is denoted by empty value or 0 value.&lt;/p&gt;

&lt;p&gt;Symbol:&lt;br&gt;
✓ This used to unique symbol like percentage,greater than and lessthan etc.&lt;/p&gt;

&lt;p&gt;∆ Non primitive data types are object, array and function.&lt;/p&gt;

&lt;p&gt;Object:&lt;br&gt;
✓ Object is a collection of key value pairs used to store data and entities.&lt;/p&gt;

&lt;p&gt;✓ Denoted using curley braces{}&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const user = { name: "Deva", age: 22 };
console.log(user.name);// Output: Deva
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Array:&lt;br&gt;
✓ Array is one of the object and used for storing multiple elements in a single container.&lt;/p&gt;

&lt;p&gt;✓ Arrays are denoted in square brackets[].&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const colors = ["red", "green", "blue"];
console.log(colors[0]); // Returns red
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Function:&lt;br&gt;
✓ A function is a reusable block of code designed to perform a specific task&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function welcome(name) {
  return "Hello, " + name;
}
console.log(welcome("Deva"));// Output: Hello Deva
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Difference Between Primitive and Non Primitive Data Types:
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Primitive Data types:
&lt;/h2&gt;

&lt;p&gt;◾&lt;code&gt;Immutable&lt;/code&gt;: Values cannot be changed.&lt;/p&gt;

&lt;p&gt;◾ Immutable means if the value reassign does not replace a memory of older one's.Rather than creates a new memory to store the value.&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 plaintext"&gt;&lt;code&gt;let i = 10;
    i = 12;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹In the above example the variable are declared and initialize the value 10.&lt;/p&gt;

&lt;p&gt;🔹Then reassign the value 12.&lt;/p&gt;

&lt;p&gt;🔹In this situation first memory creates and assign the value 10.&lt;/p&gt;

&lt;p&gt;🔹Next the reassign value 12 is not assigned the memory of value 10.&lt;/p&gt;

&lt;p&gt;🔹It creates a new memory and stores that value.&lt;/p&gt;

&lt;p&gt;◾Storage:Stores by values in the stack.&lt;/p&gt;

&lt;p&gt;🔹Every value stored by stack order&lt;br&gt;
line by line.&lt;/p&gt;

&lt;p&gt;🔹First value stored and then second value stored above the first value.&lt;/p&gt;

&lt;p&gt;◾ Comparison:Compared by actual value.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fc1d1j6ujxk086dchrjs0.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fc1d1j6ujxk086dchrjs0.jpg" alt=" " width="720" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fgflacjkun2dmvdh8rzmb.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fgflacjkun2dmvdh8rzmb.jpg" alt=" " width="720" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹It's compared by values (i(10)==j (10))&lt;br&gt;
Prints true.&lt;/p&gt;

&lt;p&gt;◾Methods:Do not have any methods but use the wrappers.&lt;/p&gt;

&lt;p&gt;◾Starts with a lowercase.&lt;/p&gt;
&lt;h2&gt;
  
  
  Non Primitive Data types:
&lt;/h2&gt;

&lt;p&gt;◾Mutable:Values can be changed or modified.&lt;/p&gt;

&lt;p&gt;◾Storing:Storing by the heap.&lt;/p&gt;

&lt;p&gt;🔹Does not follow the any order store a heap order.&lt;/p&gt;

&lt;p&gt;◾Comparison:Compared by memory reference or address.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fnzoc1e3tcjxtsci7l3c8.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fnzoc1e3tcjxtsci7l3c8.jpg" alt=" " width="720" height="244"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹In this program the array values i = [10] and j = [10] is have the same value 10.&lt;/p&gt;

&lt;p&gt;🔹But [10] = [10] are not take the value, it takes the memory address of the value.&lt;/p&gt;

&lt;p&gt;🔹So it's returns the false.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Ff0vvlhhqpz2m8hjept2p.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Ff0vvlhhqpz2m8hjept2p.jpg" alt=" " width="720" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;◾Can have the methods and properties.&lt;/p&gt;

&lt;p&gt;◾ It's only starts with a uppercase.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is Variables:
&lt;/h2&gt;

&lt;p&gt;◾Variables is a data containers&lt;/p&gt;

&lt;p&gt;◾Variables are used to store data values.&lt;/p&gt;

&lt;p&gt;◾The variables can be stored 4 different ways how the values should behave.&lt;/p&gt;

&lt;p&gt;◾Older Javascript:&lt;br&gt;
  🔹Using &lt;code&gt;var&lt;/code&gt;&lt;br&gt;
  🔹Automatically&lt;br&gt;
(Both are not recommended)&lt;/p&gt;

&lt;p&gt;◾Modern Javascript:&lt;br&gt;
  🔹Using &lt;code&gt;let&lt;/code&gt;&lt;br&gt;
  🔹Using &lt;code&gt;const&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Using the let:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fq5sj0e8tl9s7mijnhxas.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fq5sj0e8tl9s7mijnhxas.jpg" alt=" " width="720" height="284"&gt;&lt;/a&gt;&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2F40u79p93bbw8b36t0k6l.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F40u79p93bbw8b36t0k6l.jpg" alt=" " width="720" height="205"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹i contains the value 5&lt;br&gt;
🔹j contains the value 6&lt;br&gt;
🔹k adds the i and j stores the value 11.&lt;/p&gt;

&lt;p&gt;Using the const:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fhyrkeknd1oc3z0sztvkg.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fhyrkeknd1oc3z0sztvkg.jpg" alt=" " width="720" height="253"&gt;&lt;/a&gt;&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fzu6xeqhhwtn7bratd607.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fzu6xeqhhwtn7bratd607.jpg" alt=" " width="720" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹i contains the value 7&lt;br&gt;
🔹j contains the value 3&lt;br&gt;
🔹k adds the i and j stores the value 10.&lt;/p&gt;

&lt;p&gt;JAVASCRIPT IDENTIFIERS:&lt;/p&gt;

&lt;p&gt;◾ Variables are identified with unique names called identifiers.&lt;/p&gt;

&lt;p&gt;◾The rules for creating a name are:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;🔹Names can contain letters, digits, underscores, and dollar signs.

🔹Names must begin with a letter, a $ sign or an underscore (_).

🔹Names are case sensitive ,because capital X is different from small x.

🔹Reserved  JavaScript  keywords like `const`, `let` `import`,`export` cannot be used as names.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;Javascript Underscore(_):&lt;/p&gt;

&lt;p&gt;◾The underscore is treated as a letter in JavaScript names.&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fsjv1urlgot0joprdx86b.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fsjv1urlgot0joprdx86b.jpg" alt=" " width="720" height="278"&gt;&lt;/a&gt;&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2F94oo2fus68yl28235ryk.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F94oo2fus68yl28235ryk.jpg" alt=" " width="720" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Javascript Dollor sign $:&lt;/p&gt;

&lt;p&gt;◾The Dollor sign also treated as a letter in JavaScript names.&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fm29fkvi0m26jjl1m15he.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fm29fkvi0m26jjl1m15he.jpg" alt=" " width="720" height="266"&gt;&lt;/a&gt;&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fgwca3w6l30h99p4wk5ls.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fgwca3w6l30h99p4wk5ls.jpg" alt=" " width="720" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;DECLARING A JAVASCRIPT VARIABLES:&lt;/p&gt;

&lt;p&gt;◾Creating a variable in JavaScript is called declaring a variable.&lt;/p&gt;

&lt;p&gt;◾Using &lt;code&gt;let&lt;/code&gt; and  &lt;code&gt;const&lt;/code&gt; keywords to declare a variable in javascript.&lt;/p&gt;

&lt;p&gt;Declaring a Variable Using let:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let Phonename = "Realme";
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🔹After the declaration, you'll not assign the value it is &lt;code&gt;undefined&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;🔹assign a value to a variable using equal = (assignment operator)&lt;/p&gt;

&lt;p&gt;🔹It's better to assign the value while you declared a variable.&lt;/p&gt;

&lt;p&gt;Declaring a Variable Using const:&lt;/p&gt;

&lt;p&gt;◾Always use &lt;code&gt;const&lt;/code&gt; if the value should not be changed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Phonename = "Realme";``
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When to Use var, let, or const?&lt;/p&gt;

&lt;p&gt;◾Always declare a variables&lt;/p&gt;

&lt;p&gt;◾Always use &lt;code&gt;const&lt;/code&gt;, if the value should not be changed.&lt;/p&gt;

&lt;p&gt;◾Only use&lt;code&gt;let&lt;/code&gt;if you cannot use const.&lt;/p&gt;

&lt;p&gt;◾Never used &lt;code&gt;var&lt;/code&gt;and declare variable automatically.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>learning</category>
      <category>writing</category>
    </item>
    <item>
      <title>Details About the Basic Array Methods</title>
      <dc:creator>Deva I</dc:creator>
      <pubDate>Wed, 08 Apr 2026 15:01:20 +0000</pubDate>
      <link>https://dev.to/deva_i_932c8869ada96d4c9f/details-about-the-basic-array-methods-3b6i</link>
      <guid>https://dev.to/deva_i_932c8869ada96d4c9f/details-about-the-basic-array-methods-3b6i</guid>
      <description>&lt;p&gt;In the previous blog I was post the basic array methods.In this blog discuss the detail about the array methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  Array length:
&lt;/h2&gt;

&lt;p&gt;◾The &lt;code&gt;length&lt;/code&gt; method returns the count or size of an array.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fus3mpci1bbbtocchydb2.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fus3mpci1bbbtocchydb2.jpg" alt=" " width="720" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹In the array have 5 elements,so its returns the length 5.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F9e9j81zp0vmir4iasof6.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F9e9j81zp0vmir4iasof6.jpg" alt=" " width="720" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array toString()
&lt;/h2&gt;

&lt;p&gt;◾The &lt;code&gt;tostring()&lt;/code&gt;method returns the elements of an array to a separated string with a comma.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F2zd8nz8nycmq8wde9jyy.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F2zd8nz8nycmq8wde9jyy.jpg" alt=" " width="720" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹This method converts a every single Mobilebrand into an one single array seperate a comma.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fqu46wkj8jct1hmjwmfgt.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fqu46wkj8jct1hmjwmfgt.jpg" alt=" " width="720" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array at()
&lt;/h2&gt;

&lt;p&gt;◾The &lt;code&gt;at()&lt;/code&gt; method returns an indexed element from an array.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fs1zy5ef6gncxeb12xfmr.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fs1zy5ef6gncxeb12xfmr.jpg" alt=" " width="720" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹 Mobilebrand.at(3) returns a indexed element 3 'samsung'.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F7pjqtiko1tp8hd4c753g.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F7pjqtiko1tp8hd4c753g.jpg" alt=" " width="720" height="227"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Array Join()&lt;br&gt;
◾The &lt;code&gt;join()&lt;/code&gt; method also joins all array elements into a string.&lt;/p&gt;

&lt;p&gt;◾This acts like a tostring().&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F4k7581ok1fd5qmr5cqq3.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F4k7581ok1fd5qmr5cqq3.jpg" alt=" " width="720" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹In this join() method we give a (+),so its create a array into a string joins with inbetween (+) element.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F7aj9k3248g9yuvek3p2p.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F7aj9k3248g9yuvek3p2p.jpg" alt=" " width="720" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array pop()
&lt;/h2&gt;

&lt;p&gt;◾The &lt;code&gt;pop()&lt;/code&gt; method removes the last element from an array.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F97sharo8ldjamscxityk.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F97sharo8ldjamscxityk.jpg" alt=" " width="720" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹pop() method removes the end element 'nothing' frome the array.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F4u560n5eqgq13r3unq7r.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F4u560n5eqgq13r3unq7r.jpg" alt=" " width="720" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array push()
&lt;/h2&gt;

&lt;p&gt;◾The &lt;code&gt;push()&lt;/code&gt; method adds a new element in the end of an array.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fraipeff24k0vd8zzvio3.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fraipeff24k0vd8zzvio3.jpg" alt=" " width="720" height="326"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹push() method adds a 'vivo' end of the array.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fbmozx9gnrn53r8cjdy5x.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fbmozx9gnrn53r8cjdy5x.jpg" alt=" " width="720" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array shift()
&lt;/h2&gt;

&lt;p&gt;◾The &lt;code&gt;shift()&lt;/code&gt; method removes the first array element and "shifts" all other elements to a starting index.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F7qtqaq871tjcqk1z5tq4.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F7qtqaq871tjcqk1z5tq4.jpg" alt=" " width="720" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹Shift() method removes first element 'realme'.&lt;/p&gt;

&lt;p&gt;🔹The balance elements shifts the place of removed element.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fiw2arktr2qaa9qxw3t9d.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fiw2arktr2qaa9qxw3t9d.jpg" alt=" " width="720" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array unshift()
&lt;/h2&gt;

&lt;p&gt;◾The &lt;code&gt;unshift()&lt;/code&gt; method adds a new element in the beginning of an array and the other elements unshifts the older elements.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F1o6p8j7q78vwpwfch8us.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F1o6p8j7q78vwpwfch8us.jpg" alt=" " width="720" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹'oneplus' added to the beginning of the array.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fzrrox4hbxk4e1yhiq2a0.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fzrrox4hbxk4e1yhiq2a0.jpg" alt=" " width="720" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array.isArray()
&lt;/h2&gt;

&lt;p&gt;◾The &lt;code&gt;Array.isArray()&lt;/code&gt;used to finds array is really a array to returns a true.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fgqjx5dh88kvy77djxh8e.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fgqjx5dh88kvy77djxh8e.jpg" alt=" " width="720" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹Mobilebrand is array,so its returns a true.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F3nf3rpmsom91cnhbbovz.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F3nf3rpmsom91cnhbbovz.jpg" alt=" " width="720" height="218"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array delete()
&lt;/h2&gt;

&lt;p&gt;◾&lt;code&gt;delete()&lt;/code&gt;method returns a undefined.&lt;/p&gt;

&lt;p&gt;◾Use the push and pop method instead of delete.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fibn4zojl0vbqxhwtwrql.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fibn4zojl0vbqxhwtwrql.jpg" alt=" " width="720" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹Mobilebrand[1] defines undefined.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fr6qzxk6lwy2sjf5lh0xl.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fr6qzxk6lwy2sjf5lh0xl.jpg" alt=" " width="720" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array concat()
&lt;/h2&gt;

&lt;p&gt;◾The &lt;code&gt;concat()&lt;/code&gt; method creates a new array to merging the existing arrays.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fupxhchimyrkldfb2re3t.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fupxhchimyrkldfb2re3t.jpg" alt=" " width="720" height="361"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹Concat merge the GroupB array to existing array GroupA to in a single array.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fbmmbjfjrdjkrcnrrj5aw.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fbmmbjfjrdjkrcnrrj5aw.jpg" alt=" " width="720" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array copy Within()
&lt;/h2&gt;

&lt;p&gt;◾The &lt;code&gt;copy Within()&lt;/code&gt; method copies array elements to another position in an array.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fthm5u62ltxqu2mvko6y1.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fthm5u62ltxqu2mvko6y1.jpg" alt=" " width="720" height="320"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fdy304i7rd95i9zgtqhis.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fdy304i7rd95i9zgtqhis.jpg" alt=" " width="720" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array flat()
&lt;/h2&gt;

&lt;p&gt;◾The &lt;code&gt;flat()&lt;/code&gt; method creates a new array and merge with sub-array.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fk57x87g9g1huocopvs45.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fk57x87g9g1huocopvs45.jpg" alt=" " width="720" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹flat method Merge the sub arrays with array&lt;br&gt;
groups.&lt;/p&gt;

&lt;p&gt;🔹Merge the sub array numbers in one array.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fl0ogkz3fauegsrea341u.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fl0ogkz3fauegsrea341u.jpg" alt=" " width="720" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array splice()
&lt;/h2&gt;

&lt;p&gt;◾The &lt;code&gt;splice()&lt;/code&gt; method can be used to add new items to an array.&lt;/p&gt;

&lt;p&gt;EXAMPLE 1:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fzb1ss8d0kpe4i9zniz3n.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fzb1ss8d0kpe4i9zniz3n.jpg" alt=" " width="720" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;OUTPUT 1:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fn0x6ar8ra7ug9hjq784k.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fn0x6ar8ra7ug9hjq784k.jpg" alt=" " width="720" height="213"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹The first parameter (2) defines the position where new elements should be added.&lt;/p&gt;

&lt;p&gt;🔹dc and srh added index 2&lt;/p&gt;

&lt;p&gt;🔹The second parameter (0) defines how many elements should be removed.&lt;/p&gt;

&lt;p&gt;🔹Second value is 0 no value has been removed.&lt;/p&gt;

&lt;p&gt;EXAMPLE 2:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fucdzrxvws188qcnnw4rd.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fucdzrxvws188qcnnw4rd.jpg" alt=" " width="720" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹The first parameter (2) defines the position where new elements should be added.&lt;/p&gt;

&lt;p&gt;🔹dc and srh added index 2&lt;/p&gt;

&lt;p&gt;🔹The second parameter (1) defines how many elements should be removed.&lt;/p&gt;

&lt;p&gt;🔹Second value is 1,so 'rcb' has been removed.&lt;/p&gt;

&lt;p&gt;OUTPUT 2:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fksp25aed20qtng3xtk5t.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fksp25aed20qtng3xtk5t.jpg" alt=" " width="720" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array Slice()
&lt;/h2&gt;

&lt;p&gt;◾The &lt;code&gt;slice()&lt;/code&gt; method slices out a piece of an array into a new array:&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fa68pjsx632wrp90hgpyk.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fa68pjsx632wrp90hgpyk.jpg" alt=" " width="720" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹Slice out a part of an array starting from array element 1 ("csk")&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F3rflsirbljm3qhdsm112.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F3rflsirbljm3qhdsm112.jpg" alt=" " width="720" height="219"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Array to Spliced()
&lt;/h2&gt;

&lt;p&gt;◾It also removes the element from the array.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F9458dhvxcmewym0boizp.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F9458dhvxcmewym0boizp.jpg" alt=" " width="720" height="350"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹'0' defines the index and '2' defines the two elements.&lt;/p&gt;

&lt;p&gt;🔹Elements removed starting from the index 0 to two elements.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fy6q5fjp5dvzmq4itdw91.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fy6q5fjp5dvzmq4itdw91.jpg" alt=" " width="720" height="215"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>learning</category>
      <category>writing</category>
    </item>
    <item>
      <title>Discuss about the topics of 1.Constructor Function 2.Return Statement in Javascript 3.Bacis Array Methods</title>
      <dc:creator>Deva I</dc:creator>
      <pubDate>Tue, 07 Apr 2026 14:29:15 +0000</pubDate>
      <link>https://dev.to/deva_i_932c8869ada96d4c9f/discuss-about-the-topics-of-1constructor-function-2return-l13</link>
      <guid>https://dev.to/deva_i_932c8869ada96d4c9f/discuss-about-the-topics-of-1constructor-function-2return-l13</guid>
      <description>&lt;h2&gt;
  
  
  Constructor Function:
&lt;/h2&gt;

&lt;p&gt;◾Constructor function is used to create and initialize multiple objects of the same type.&lt;/p&gt;

&lt;p&gt;◾It overcomes the difficulty of multiline code, construct a single line.&lt;/p&gt;

&lt;p&gt;◾Constructor must be called with the &lt;code&gt;new&lt;/code&gt;operator.&lt;/p&gt;

&lt;p&gt;Const phone1 ={&lt;br&gt;
     brand:"Nothing",&lt;br&gt;
     model:"cmf phone 2pro",&lt;br&gt;
     price:20000&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;Const phone2 = {&lt;br&gt;
     brand:"Realme",&lt;br&gt;
     model:"P4 pro",&lt;br&gt;
     price:22000&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;✓ It's a normal object creation for phone details.&lt;/p&gt;

&lt;p&gt;✓ This method enough with two or three phone details.&lt;/p&gt;

&lt;p&gt;✓ What if, can write the details of all realme brand mobiles,so overcome this difficult use a contructor function to construct a code in single line.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example:
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2Fjwzjv1nxenwqnnabjj39.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fjwzjv1nxenwqnnabjj39.jpg" alt=" " width="701" height="583"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;EXPLANATION:&lt;/p&gt;

&lt;p&gt;🔹Create a function to give the parameters(Nothing","cmf phone 2pro",20000) of you write.&lt;/p&gt;

&lt;p&gt;🔹Then to sets a this operation to call a properties and methods.&lt;/p&gt;

&lt;p&gt;🔹This multiline code&lt;br&gt;
       brand:"Nothing",&lt;br&gt;
       model:"cmf phone 2pro",&lt;br&gt;
       price:20000 &lt;br&gt;
   Written a single line code of&lt;br&gt;
       const phone 1 = new phone("nothing", "cmf phone 2pro", 20000);&lt;/p&gt;

&lt;p&gt;🔹Writing, const phone2 = new phone("realme", "p4 pro" 22000);&lt;br&gt;
instead of this code&lt;br&gt;
       brand:"Realme",&lt;br&gt;
       model:"P4 pro",&lt;br&gt;
       price:22000&lt;/p&gt;

&lt;p&gt;🔹Use the &lt;code&gt;new&lt;/code&gt;keyword,when you use the new keyword javascript performs the above steps.&lt;/p&gt;

&lt;p&gt;🔹Use the this to Print the code like (this.brand, this.model, this .price);&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fc0lvxalcwtfd8kgf6y8q.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fc0lvxalcwtfd8kgf6y8q.jpg" alt=" " width="700" height="185"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Return Statement in Javascript:
&lt;/h2&gt;

&lt;p&gt;◾The return statement is used to end function execution and a value to be sent back to the caller.&lt;/p&gt;

&lt;p&gt;◾The caller used that value at any time.&lt;/p&gt;

&lt;p&gt;◾If the caller don't return the value the value won't used to be any variable.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fbgwzh57it61cedn0wokn.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fbgwzh57it61cedn0wokn.jpg" alt=" " width="720" height="389"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🔹Create a function named add(a,b)&lt;/p&gt;

&lt;p&gt;🔹Return the  parameters a and b.&lt;/p&gt;

&lt;p&gt;🔹Create a new variable to store the function name and give the values of parameters.&lt;/p&gt;

&lt;p&gt;🔹Then print the code.&lt;/p&gt;

&lt;p&gt;🔹The sum output 15 is return to the caller function add.&lt;/p&gt;

&lt;p&gt;🔹The value can be used at any variable,if not the give the return statement the value won't be used at any variable.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2F9ny2o7xjp2jne5wl0inm.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F9ny2o7xjp2jne5wl0inm.jpg" alt=" " width="720" height="167"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Returning value of some data types:
&lt;/h2&gt;

&lt;p&gt;Undefined:&lt;br&gt;
Returned for variables declared but not yet assigned a value.&lt;/p&gt;

&lt;p&gt;Boolean:&lt;br&gt;
Returned for true and false.&lt;/p&gt;

&lt;p&gt;Number:&lt;br&gt;
Returned integers(1,2,3), floats(3.1,2.13), and special values like NaN and Infinity.&lt;/p&gt;

&lt;p&gt;BigInt:&lt;br&gt;
Used for larger integers like 123456.&lt;/p&gt;

&lt;p&gt;String:Returned for all textual data with a double quotation like ("javascript","Deva","123")&lt;/p&gt;

&lt;p&gt;Object:Returned for objects {} and arrays [].&lt;/p&gt;

&lt;h2&gt;
  
  
  Basic Array Methods:
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Array length

Array isArray)

Array toString()

Array delete()

Array at()

Array concat()

Array Join()

Array copy Within()

Array pop()

Array flat()

Array push()

Array slice()

Array shift()

Array splice()

Array unshift()

Array to Spliced()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(To be discussed )&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>learning</category>
    </item>
    <item>
      <title>Objects in Javascript</title>
      <dc:creator>Deva I</dc:creator>
      <pubDate>Mon, 06 Apr 2026 13:55:42 +0000</pubDate>
      <link>https://dev.to/deva_i_932c8869ada96d4c9f/objects-in-javascript-3h0i</link>
      <guid>https://dev.to/deva_i_932c8869ada96d4c9f/objects-in-javascript-3h0i</guid>
      <description>&lt;h2&gt;
  
  
  Definition of Objects:
&lt;/h2&gt;

&lt;p&gt;◾Object in simple words it's a real world entity.&lt;/p&gt;

&lt;p&gt;◾An object is a dynamic data structure that stores data as key-value pairs, where each key uniquely identifies its value.&lt;/p&gt;

&lt;p&gt;◾Objects are mutable and dynamic properties can be added, modified, or deleted at any time.&lt;/p&gt;

&lt;p&gt;◾Object is enclosed with curley braces{}.&lt;/p&gt;

&lt;p&gt;◾Objects contains properties and methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  Syntax:
&lt;/h2&gt;

&lt;p&gt;Const object name(){&lt;br&gt;
    properties(key-pairs)&lt;br&gt;
}&lt;/p&gt;

&lt;h2&gt;
  
  
  CRUD Operation of Object:
&lt;/h2&gt;

&lt;p&gt;C - Create&lt;br&gt;
R - Read&lt;br&gt;
U - Update&lt;br&gt;
D - Delete&lt;/p&gt;

&lt;h2&gt;
  
  
  Create the Object:
&lt;/h2&gt;

&lt;p&gt;▪️Create a new object or add new keys the existing object.&lt;/p&gt;

&lt;p&gt;EXAMPLE PROGRAM:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fom325btrnx2smkk4piy8.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fom325btrnx2smkk4piy8.jpg" alt=" " width="720" height="436"&gt;&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;1.Const is a syntax notation of object.&lt;/p&gt;

&lt;p&gt;2.phone is the object&lt;/p&gt;

&lt;p&gt;3.The information of inside the curley braces called properties.&lt;/p&gt;

&lt;p&gt;4.In the properties left side of the colon(:) is called keys and the next to right side of the colon(:) called values.&lt;/p&gt;

&lt;p&gt;5.console.log(phone.price)&lt;br&gt;
   Phone - object name&lt;br&gt;
   Price - key name&lt;br&gt;
   (.)  - dot operator.It's used to seperate the object name and key name.&lt;/p&gt;

&lt;h2&gt;
  
  
  Read in objects:
&lt;/h2&gt;

&lt;p&gt;▪️Read or print the values using keys&lt;/p&gt;

&lt;p&gt;EXAMPLE PROGRAM:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fwjelalt43d86ch5lccc7.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fwjelalt43d86ch5lccc7.jpg" alt=" " width="720" height="625"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1.In the above program was read and print the existing data of objects using the keywords.&lt;/p&gt;

&lt;p&gt;2.brand prints their value oneplus.&lt;br&gt;
price prints:25000 &lt;br&gt;
color prints:navy blue&lt;br&gt;
Processor prints: Snapdragon 7 gen3&lt;br&gt;
Model prints:Nord CE5.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2F73coe1hvcrkkcvn75q5o.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F73coe1hvcrkkcvn75q5o.jpg" alt=" " width="720" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Update in objects:
&lt;/h2&gt;

&lt;p&gt;▪️Update the new value instead of existing value.&lt;/p&gt;

&lt;p&gt;EXAMPLE PROGRAM:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fv9of2v0bfy7madbihctx.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fv9of2v0bfy7madbihctx.jpg" alt=" " width="720" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1.Update the new value,&lt;br&gt;
   phone.price = 28000&lt;br&gt;
   phone.color = "Marble mist"&lt;br&gt;
   phone.processor = "Mediatek dimensity 8350 Apex " instead of existing values.&lt;/p&gt;

&lt;p&gt;2.If you want rearrange the values, using object name and keyword.&lt;/p&gt;

&lt;p&gt;3.It takes the value of last rearranged value.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2F5j7vjr56kbq3gdwj45gu.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F5j7vjr56kbq3gdwj45gu.jpg" alt=" " width="720" height="226"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Delete in objects:
&lt;/h2&gt;

&lt;p&gt;▪️Delete the property and its value from the objects.&lt;/p&gt;

&lt;p&gt;EXAMPLE PROGRAM:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F84okbdbr89bwu8y7yruc.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F84okbdbr89bwu8y7yruc.jpg" alt=" " width="720" height="556"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;1.Using delete operator to remove the phone color and processor.&lt;/p&gt;

&lt;p&gt;2.If the property was successfully removed it returns &lt;code&gt;true&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2F2irmi5v1la9xjbq7pk39.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F2irmi5v1la9xjbq7pk39.jpg" alt=" " width="720" height="222"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Function in Javascript</title>
      <dc:creator>Deva I</dc:creator>
      <pubDate>Mon, 06 Apr 2026 05:34:59 +0000</pubDate>
      <link>https://dev.to/deva_i_932c8869ada96d4c9f/function-in-javascript-3me0</link>
      <guid>https://dev.to/deva_i_932c8869ada96d4c9f/function-in-javascript-3me0</guid>
      <description>&lt;h2&gt;
  
  
  Definition of Function:
&lt;/h2&gt;

&lt;p&gt;✓ Some activity or set of instructions with name called function.&lt;/p&gt;

&lt;p&gt;✓ In JavaScript, a function is a reusable block of code designed to perform a specific task. Functions are executed when they are "invoked" or called.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Function Declaration:
&lt;/h2&gt;

&lt;p&gt;✓ Most common way to define a function using the function keyword.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example:
&lt;/h2&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.amazonaws.com%2Fuploads%2Farticles%2Fbikrefxgp2rx6v8rh6d9.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fbikrefxgp2rx6v8rh6d9.jpg" alt=" " width="714" height="511"&gt;&lt;/a&gt;&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fpdi4sqpmi6y7ld2xn7og.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fpdi4sqpmi6y7ld2xn7og.jpg" alt=" " width="720" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Parameters: name is a placeholder for the value you pass into the function.&lt;/p&gt;

&lt;p&gt;Arguments: "Deva" is the actual value (argument) passed during the call.&lt;/p&gt;

&lt;p&gt;Return Statement: The return keyword stops function execution and sends a value back to the caller.&lt;/p&gt;

&lt;h2&gt;
  
  
  Function Expression:
&lt;/h2&gt;

&lt;p&gt;A function can also be defined inside an expression and assigned to a variable.&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Ffulzv0kx7efr5clojy4e.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Ffulzv0kx7efr5clojy4e.jpg" alt=" " width="720" height="353"&gt;&lt;/a&gt;&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fi4y9gk6flt34mbcw2eoi.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fi4y9gk6flt34mbcw2eoi.jpg" alt=" " width="720" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Concepts:
&lt;/h2&gt;

&lt;p&gt;Reusability: You can call the same function multiple times with different arguments to get different results.&lt;/p&gt;

&lt;p&gt;Scope: Variables defined inside a function are "local" and cannot be accessed from outside that function.&lt;/p&gt;

&lt;p&gt;Anonymous Functions: These are functions without a name, often used as "callbacks" (functions passed as arguments to other functions).       &lt;/p&gt;

&lt;p&gt;Built-in Functions: JavaScript includes pre-defined functions that you can use immediately like console.log(), alert(), and Math.sqrt().     (To be discussed)&lt;/p&gt;

&lt;p&gt;Reference:&lt;a href="https://www.geeksforgeeks.org/javascript/functions-in-javascript/" rel="noopener noreferrer"&gt;https://www.geeksforgeeks.org/javascript/functions-in-javascript/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
      <category>beginners</category>
      <category>learning</category>
    </item>
    <item>
      <title>In Array Program Using Any Student Marks To Find: 1.Fail Count. 2.Total Marks. 3.Average. 4.If the student fails Print "No grade" or Pass print "Grade".</title>
      <dc:creator>Deva I</dc:creator>
      <pubDate>Thu, 02 Apr 2026 15:09:29 +0000</pubDate>
      <link>https://dev.to/deva_i_932c8869ada96d4c9f/in-array-program-using-any-student-marks-to-find-1fail-count-2total-marks-3average-4if-the-18j8</link>
      <guid>https://dev.to/deva_i_932c8869ada96d4c9f/in-array-program-using-any-student-marks-to-find-1fail-count-2total-marks-3average-4if-the-18j8</guid>
      <description>&lt;p&gt;1.Fail Count. &lt;br&gt;
2.Total Marks.&lt;br&gt;
3.Average.&lt;br&gt;
4.If the student fails Print "No grade" or Pass print "Grade" based on Average.&lt;/p&gt;

&lt;p&gt;1)PROGRAM:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2F4oqz8c2nzyqbsl2y2rac.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F4oqz8c2nzyqbsl2y2rac.jpg" alt=" " width="720" height="998"&gt;&lt;/a&gt;&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fdugjnkjwaq45t73s2iq8.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fdugjnkjwaq45t73s2iq8.jpg" alt=" " width="718" height="727"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;STEPS:&lt;/p&gt;

&lt;p&gt;Step 1: Declare a marks in an array.Notation is const marks[marks]&lt;/p&gt;

&lt;p&gt;Step 2:We wanna fail count,total, and average.so declare a global variable named let.we don't know about the fail count,total and average so, declare let fail=0,total=0,average=0.&lt;/p&gt;

&lt;p&gt;Step 3: Then declare i=0.because the first element of array is index 0.&lt;/p&gt;

&lt;p&gt;Step 4:Next write the while loop(i&amp;lt;5). because the array have five elements and index starting 0 to 4.&lt;/p&gt;

&lt;p&gt;Step 5:Then declare the if(marks[i]&amp;lt;35)&lt;/p&gt;

&lt;p&gt;Step 6:If the condition is true increase the fail count.&lt;/p&gt;

&lt;p&gt;Step 7: Increment the value of i&lt;/p&gt;

&lt;p&gt;Step 8:Print the fail count out of the while loop.&lt;/p&gt;

&lt;p&gt;Step 9:Then again open the If statement to give (fail&amp;gt;0).&lt;/p&gt;

&lt;p&gt;Step 10:If the condition is true,print No grade.&lt;/p&gt;

&lt;p&gt;Step 11:Else again declare i=0.because in the previous we declared i, is fails and breaks the while loop because i=5 is (i&amp;lt;5).false.Now i value is 5.so again redeclare i or give another variable names like j,k.&lt;/p&gt;

&lt;p&gt;Step 12:Write a new while loop give condition of while(i&amp;lt;5)&lt;/p&gt;

&lt;p&gt;Step 13:Then give total = total + marks[i].&lt;/p&gt;

&lt;p&gt;Step 14:Next increment the value of i.&lt;/p&gt;

&lt;p&gt;Step 15:Out of while loop print total.&lt;/p&gt;

&lt;p&gt;Step 16:Then find average.so give average= total/5.because we have 5 variables.&lt;/p&gt;

&lt;p&gt;Step 17:Then write if condition student have no fail count if (fail==0).&lt;/p&gt;

&lt;p&gt;Step 18:if (average &amp;gt;=90)&lt;br&gt;
         Print Grade A&lt;/p&gt;

&lt;p&gt;Step 19: else if (average &amp;gt;80 &amp;amp;&amp;amp; average &amp;lt; 90)&lt;br&gt;
         Print Grade B&lt;/p&gt;

&lt;p&gt;Step 20: else if (average &amp;gt;70 &amp;amp;&amp;amp; average &amp;lt; 80)&lt;br&gt;
         Print Grade C&lt;/p&gt;

&lt;p&gt;Step 21:else if (average &amp;gt;50 &amp;amp;&amp;amp; average &amp;lt; 70)&lt;br&gt;
         Print Grade D&lt;/p&gt;

&lt;p&gt;Step 22:else &lt;br&gt;
         Print Grade E&lt;/p&gt;

&lt;p&gt;WORKING:&lt;/p&gt;

&lt;p&gt;1.We wanna fail count so declare fail count is 0.&lt;/p&gt;

&lt;p&gt;2.Then check the while condition:&lt;br&gt;
i = 0&lt;br&gt;
While(0&amp;lt;5).True&lt;br&gt;
i = 1&lt;br&gt;
While(1&amp;lt;5).True&lt;br&gt;
i = 2&lt;br&gt;
While(2&amp;lt;5).True&lt;br&gt;
i = 3&lt;br&gt;
While(3&amp;lt;5).True&lt;br&gt;
i = 4&lt;br&gt;
While(4&amp;lt;5).True&lt;br&gt;
i = 5&lt;br&gt;
While(5&amp;lt;5).false.loop stop&lt;/p&gt;

&lt;p&gt;3.Next check the if condition:&lt;/p&gt;

&lt;p&gt;Index 0=80&lt;br&gt;
if(marks[80]&amp;lt;35).false&lt;/p&gt;

&lt;p&gt;Index 1=98&lt;br&gt;
if(marks[98]&amp;lt;35).false&lt;/p&gt;

&lt;p&gt;Index 2=89&lt;br&gt;
if(marks[89]&amp;lt;35).false&lt;/p&gt;

&lt;p&gt;Index 3=33&lt;br&gt;
if(marks[33]&amp;lt;35).true&lt;/p&gt;

&lt;p&gt;Index 4=100&lt;br&gt;
if(marks[100]&amp;lt;35).false&lt;/p&gt;

&lt;p&gt;4.If the condition is true fail count is increase.In the above condition index 0.1,2,4 is false. so fail count not increase.Index 3 is true,then fail count increase.Fail count is 1.&lt;/p&gt;

&lt;p&gt;5.Finally when the while loop fails it prints the fail count.&lt;/p&gt;

&lt;p&gt;6.Next fail count is &amp;gt; 0,Print No grade.(fail&amp;gt;0)&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ◾ Fail is 1&amp;gt; 0.true
  So,in this program not runs else part.print No grade. 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;7.If the above if condition is fails the else part will runs.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fo967jfeanrug2spjw1ay.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fo967jfeanrug2spjw1ay.jpg" alt=" " width="720" height="231"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2)PROGRAM:&lt;br&gt;
✓ In this program little vary from above program. one array value is changed. Index 3 value 89 changed instead of 33.&lt;/p&gt;

&lt;p&gt;✓ Otherwise same steps like above program.&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F5ms9hzkxhgna9rapugt7.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F5ms9hzkxhgna9rapugt7.jpg" alt=" " width="720" height="998"&gt;&lt;/a&gt;&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fxgxsrlwz3sjj7r2sxwpd.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fxgxsrlwz3sjj7r2sxwpd.jpg" alt=" " width="720" height="718"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WORKING:&lt;br&gt;
1.Same working like above program in the No grade step.In this program fail count is 0.So the else part runs.&lt;/p&gt;

&lt;p&gt;2.If the above if condition is fails so the else part runs.so create new while loop and give&lt;br&gt;
  i = 0 and then while (i&amp;lt;5) &lt;/p&gt;

&lt;p&gt;3.Find total,so total = total + marks[i].&lt;/p&gt;

&lt;p&gt;◾ Total=0+80 =80.total is 80&lt;/p&gt;

&lt;p&gt;◾ Total=80+98 =178.total is 178&lt;/p&gt;

&lt;p&gt;◾ Total=178+89 =267.total is 267&lt;/p&gt;

&lt;p&gt;◾ Total=267+86 =353.total is 353&lt;/p&gt;

&lt;p&gt;◾ Total=353+100 =453.&lt;br&gt;
     total is 453.&lt;/p&gt;

&lt;p&gt;4.Increment the value of i&lt;/p&gt;

&lt;p&gt;5.Then print total.&lt;/p&gt;

&lt;p&gt;6.Next find average using Math.floor it's give first value of quotient.So give average = Math.floor(total/5)&lt;/p&gt;

&lt;p&gt;◾Average = 453/5=90.6&lt;br&gt;
     We use Math.floor,so the average is 90.&lt;/p&gt;

&lt;p&gt;8.if (fail == 0).fail count&lt;br&gt;
 is 0.true&lt;/p&gt;

&lt;p&gt;7.The average is (average &amp;gt;= 90).&lt;br&gt;
  (90 = 90)&lt;/p&gt;

&lt;p&gt;8.So, print the grade A.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F9flmgmobaq90ba4qbp9f.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F9flmgmobaq90ba4qbp9f.jpg" alt=" " width="720" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>javascript</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Basic About Array in Javascript and Some Examples</title>
      <dc:creator>Deva I</dc:creator>
      <pubDate>Thu, 02 Apr 2026 09:45:08 +0000</pubDate>
      <link>https://dev.to/deva_i_932c8869ada96d4c9f/basic-about-array-in-javascript-and-some-examples-fe5</link>
      <guid>https://dev.to/deva_i_932c8869ada96d4c9f/basic-about-array-in-javascript-and-some-examples-fe5</guid>
      <description>&lt;p&gt;DEFINITION OF ARRAY:&lt;/p&gt;

&lt;p&gt;Array is an ordered collection of values that can store multiple data types under a single variable name.&lt;/p&gt;

&lt;p&gt;CHARACTERISTICS OF ARRAY:&lt;/p&gt;

&lt;p&gt;◾Zero Indexed:&lt;br&gt;
     In the array the first element is always at index 0 and the second at 1,and so on.&lt;/p&gt;

&lt;p&gt;◾Dynamic Sizing: &lt;br&gt;
    In Arrays  automatically as you add or remove elements.&lt;/p&gt;

&lt;p&gt;◾Heterogeneous: &lt;br&gt;
    A single array can hold a mix of different types, such as numbers, strings, and even other arrays.&lt;/p&gt;

&lt;p&gt;CREATING AND WORKING OF ARRAY:&lt;/p&gt;

&lt;p&gt;Creation: Use the common Array Literal notation: const mobile brand = ["Apple", "Realme","Vivo"];&lt;/p&gt;

&lt;p&gt;Working: Use bracket notation: mobile brand [0] returns "Apple".&lt;br&gt;
mobile brand [1] returns "Realme".&lt;br&gt;
mobile brand [2] returns "Vivo".&lt;/p&gt;

&lt;p&gt;FIND THE COUNT OF FAIL:&lt;/p&gt;

&lt;p&gt;PROGRAM:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F72gnvwdt1xqqqw2hblwt.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F72gnvwdt1xqqqw2hblwt.jpg" alt=" " width="718" height="553"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;STEPS:&lt;br&gt;
Step 1: Declare a marks in array.Notation is const marks[marks]&lt;/p&gt;

&lt;p&gt;Step 2:We wanna how many count the students fail.so declare a global variable named let.we don't know about the count so, declare let fail=0.&lt;/p&gt;

&lt;p&gt;Step 3: Then declare i=0.because the first element of array is index 0.&lt;/p&gt;

&lt;p&gt;Step 4:Next write the while loop(i&amp;lt;5). because the array have five elements and index starting 0 to 4.&lt;/p&gt;

&lt;p&gt;Step 5:Then declare the if(marks[i]&amp;lt;35)&lt;/p&gt;

&lt;p&gt;Step 6:If the condition is true increase the fail count.&lt;/p&gt;

&lt;p&gt;Step 7: Increment the i&lt;/p&gt;

&lt;p&gt;Step 8:Print the fail count.&lt;/p&gt;

&lt;p&gt;WORKING:&lt;br&gt;
1.We wanna fail count so declare fail count is 0.&lt;/p&gt;

&lt;p&gt;2.Then  check the while condition:&lt;br&gt;
  i = 0 &lt;br&gt;
  While(0&amp;lt;5).True&lt;br&gt;
  i = 1&lt;br&gt;
  While(1&amp;lt;5).True&lt;br&gt;
  i = 2&lt;br&gt;
  While(2&amp;lt;5).True&lt;br&gt;
  i = 3&lt;br&gt;
  While(3&amp;lt;5).True&lt;br&gt;
  i = 4 &lt;br&gt;
  While(4&amp;lt;5).True&lt;br&gt;
  i = 5&lt;br&gt;
  While(5&amp;lt;5).false.loop stop&lt;/p&gt;

&lt;p&gt;3.Next check the if condition:&lt;/p&gt;

&lt;p&gt;Index 0=80&lt;br&gt;
  if(marks[80]&amp;lt;35).false&lt;/p&gt;

&lt;p&gt;Index 1=98&lt;br&gt;
  if(marks[98]&amp;lt;35).false&lt;/p&gt;

&lt;p&gt;Index 2=89&lt;br&gt;
  if(marks[89]&amp;lt;35).false&lt;/p&gt;

&lt;p&gt;Index 3=33&lt;br&gt;
  if(marks[33]&amp;lt;35).true&lt;/p&gt;

&lt;p&gt;Index 4=100&lt;br&gt;
  if(marks[100]&amp;lt;35).false&lt;/p&gt;

&lt;p&gt;4.If the condition is true fail count is increase.In the above condition index 0.1,2,4 is false. so fail count not increase.Index 3 is true,then fail count increase.Fail count is 1.&lt;/p&gt;

&lt;p&gt;5.Finally when the while loop fails it prints the fail count.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fawje477m372lnj1adupq.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fawje477m372lnj1adupq.jpg" alt=" " width="720" height="157"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;FIND THE COUNT OF PASS AND FAIL:&lt;br&gt;
PROGRAM:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F2ntxocsehr7vbyxv32zf.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F2ntxocsehr7vbyxv32zf.jpg" alt=" " width="720" height="738"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;STEPS:&lt;/p&gt;

&lt;p&gt;Step 1: Declare a marks in array.Notation is const marks[marks]&lt;/p&gt;

&lt;p&gt;Step 2:We wanna how many count the students fail and pass count.so declare a global variable named let.we don't know about the count so, declare let fail=0 and pass=0.&lt;/p&gt;

&lt;p&gt;Step 3: Then declare i=0.because the first element of array is index 0.&lt;/p&gt;

&lt;p&gt;Step 4:Next write the while loop(i&amp;lt;5). because the array have five elements and index starting 0 to 4.&lt;/p&gt;

&lt;p&gt;Step 5:Then declare the if(marks[i]&amp;lt;35)&lt;/p&gt;

&lt;p&gt;Step 6:If the condition is true increase the fail count.&lt;/p&gt;

&lt;p&gt;Step 7:6:If the condition is false increase the pass count.&lt;/p&gt;

&lt;p&gt;Step 8: Increment the value of i&lt;/p&gt;

&lt;p&gt;Step 9:Print the fail count.&lt;/p&gt;

&lt;p&gt;WORKING:&lt;/p&gt;

&lt;p&gt;1.We wanna fail and pass count so declare fail and pass count is 0.&lt;/p&gt;

&lt;p&gt;2.Then  check the while condition:&lt;br&gt;
  i = 0 &lt;br&gt;
  While(0&amp;lt;5).True&lt;br&gt;
  i = 1&lt;br&gt;
  While(1&amp;lt;5).True&lt;br&gt;
  i = 2&lt;br&gt;
  While(2&amp;lt;5).True&lt;br&gt;
  i = 3&lt;br&gt;
  While(3&amp;lt;5).True&lt;br&gt;
  i = 4 &lt;br&gt;
  While(4&amp;lt;5).True&lt;br&gt;
  i = 5&lt;br&gt;
  While(5&amp;lt;5).false.loop stop&lt;/p&gt;

&lt;p&gt;3.Next check the if condition:&lt;br&gt;
  Index 0=80&lt;br&gt;
  if(marks[80]&amp;lt;35).false&lt;/p&gt;

&lt;p&gt;Index 1=98&lt;br&gt;
  if(marks[98]&amp;lt;35).false&lt;/p&gt;

&lt;p&gt;Index 2=89&lt;br&gt;
  if(marks[89]&amp;lt;35).false&lt;/p&gt;

&lt;p&gt;Index 3=33&lt;br&gt;
  if(marks[33]&amp;lt;35).true&lt;/p&gt;

&lt;p&gt;Index 4=100&lt;br&gt;
  if(marks[100]&amp;lt;35).false&lt;/p&gt;

&lt;p&gt;4.If the condition is true fail count is increase.In the above condition index 0.1,2,4 is false. so fail count not increase.Index 3 is true,then fail count increase.Fail count is 1.&lt;/p&gt;

&lt;p&gt;5.Then if condition is false increase pass count.Index 3 is true and except all marks are pass.so pass count is 4&lt;/p&gt;

&lt;p&gt;6.Finally when the while loop fails it prints the fail  and pass count.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fal3u94h598wnum4etkt6.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fal3u94h598wnum4etkt6.jpg" alt=" " width="716" height="183"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;FIND THE TOTAL MARKS:&lt;/p&gt;

&lt;p&gt;PROGRAM:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fw5ummp8bypjxsade46ba.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fw5ummp8bypjxsade46ba.jpg" alt=" " width="720" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;STEPS:&lt;/p&gt;

&lt;p&gt;Step 1: Declare a marks in array.Notation is const marks[marks]&lt;/p&gt;

&lt;p&gt;Step 2:We wanna total of the student.marks.so declare a global variable named let.we don't know about the total so, declare let total=0.&lt;/p&gt;

&lt;p&gt;Step 3: Then declare i=0.because the first element of array is index 0.&lt;/p&gt;

&lt;p&gt;Step 4:Next write the while loop(i&amp;lt;5). because the array have five elements and index starting 0 to 4.&lt;/p&gt;

&lt;p&gt;Step 5:Then declare total= total+marks[i].&lt;/p&gt;

&lt;p&gt;Step 6: Increment the value of i&lt;/p&gt;

&lt;p&gt;Step 8:Print the total count.&lt;/p&gt;

&lt;p&gt;WORKING:&lt;br&gt;
1.We wanna total so declare total is 0.&lt;/p&gt;

&lt;p&gt;2.Then  check the while condition:&lt;br&gt;
  i = 0 &lt;br&gt;
  While(0&amp;lt;5).True&lt;br&gt;
  i = 1&lt;br&gt;
  While(1&amp;lt;5).True&lt;br&gt;
  i = 2&lt;br&gt;
  While(2&amp;lt;5).True&lt;br&gt;
  i = 3&lt;br&gt;
  While(3&amp;lt;5).True&lt;br&gt;
  i = 4 &lt;br&gt;
  While(4&amp;lt;5).True&lt;br&gt;
  i = 5&lt;br&gt;
  While(5&amp;lt;5).false.loop stop&lt;/p&gt;

&lt;p&gt;3.Then check the condition:&lt;br&gt;
  total= total+marks[i].&lt;br&gt;
  Total=0+80 =80.total is 80&lt;/p&gt;

&lt;p&gt;Total=80+98 =178.total is 178&lt;/p&gt;

&lt;p&gt;Total=178+89 =267.total is 267&lt;/p&gt;

&lt;p&gt;Total=267+33 =300.total is 300&lt;/p&gt;

&lt;p&gt;Total=300+100 =400.total is 400&lt;/p&gt;

&lt;p&gt;4.Increment the value of i.&lt;/p&gt;

&lt;p&gt;5.Then print the total marks 400.&lt;br&gt;
OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fn8nd32mmcn93182s2wvj.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fn8nd32mmcn93182s2wvj.jpg" alt=" " width="720" height="151"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
    <item>
      <title>While loop Programs in Javascript: Reverse Printing a Number</title>
      <dc:creator>Deva I</dc:creator>
      <pubDate>Tue, 31 Mar 2026 14:02:07 +0000</pubDate>
      <link>https://dev.to/deva_i_932c8869ada96d4c9f/while-loop-programs-in-javascript-reverse-printing-a-number-2i8</link>
      <guid>https://dev.to/deva_i_932c8869ada96d4c9f/while-loop-programs-in-javascript-reverse-printing-a-number-2i8</guid>
      <description>&lt;p&gt;REVERSE PRINTING A NUMBER:&lt;/p&gt;

&lt;p&gt;PROGRAM:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F4v2thgff5ec28e809q8n.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F4v2thgff5ec28e809q8n.jpg" alt=" " width="720" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;EXPLANATION:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;assume 123.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;123%10 = remainder 3. 12% 10 = remainder 2. do, any number to divide by 10, you get he last digit.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Condition (no &amp;gt; 0). because if you reverse The number, will end a last digit is 0, so take number &amp;gt; 0&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We Don't know the Count, so take remainder let rem = 0. rem is remainder.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then take remainder = (rem* 10) + number % 10.Initial assigned rem value is 0.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;◾rem * 10 = 0 * 10 = 0 &lt;br&gt;
  no % 10 = 123 % 10= 3&lt;/p&gt;

&lt;p&gt;◾0+3=3&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Number= math. floor (number/10);
math floor means it give a initial quotient. example(123/10=12.3). It gives only first digit (or) round value 12.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;◾Then number = (123/10) = 12&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Then print The remainder.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;◾ rem= 3 &lt;br&gt;
     number= 12&lt;/p&gt;

&lt;p&gt;◾ 3 × 10 = 30&lt;br&gt;
    12% 10 = 2.          (30+2=32)&lt;/p&gt;

&lt;p&gt;◾ Then number = (12/10) = 1&lt;/p&gt;

&lt;p&gt;◾ Now rem= 32 &lt;br&gt;
     number = 1&lt;/p&gt;

&lt;p&gt;◾ rem * 10 32*10=320&lt;br&gt;
   no % 10 = 1 % 10 = 1.(320+1=321)                                         &lt;/p&gt;

&lt;p&gt;◾ Then number = (1/10) = 0&lt;/p&gt;

&lt;p&gt;◾ Then goto while loop(0&amp;gt;0) is  false.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fci8ek47gfwubdb19tgcs.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fci8ek47gfwubdb19tgcs.jpg" alt=" " width="720" height="146"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>tutorial</category>
      <category>learning</category>
      <category>programming</category>
    </item>
    <item>
      <title>Prime Number in Looping Using JavaScript</title>
      <dc:creator>Deva I</dc:creator>
      <pubDate>Mon, 30 Mar 2026 13:19:43 +0000</pubDate>
      <link>https://dev.to/deva_i_932c8869ada96d4c9f/prime-number-in-looping-using-javascript-50e</link>
      <guid>https://dev.to/deva_i_932c8869ada96d4c9f/prime-number-in-looping-using-javascript-50e</guid>
      <description>&lt;p&gt;PRIME NUMBER:&lt;br&gt;
A number greater than 1 cannot be divided evenly by any number other than 1 and itself, it is called  prime number.&lt;/p&gt;

&lt;p&gt;FIND A GIVEN NUMBER IS PRIME NUMBER&lt;br&gt;
OR NOT:&lt;/p&gt;

&lt;p&gt;LOGIC:&lt;br&gt;
✓ If a number have only 2 count divisors is prime,On tha other hand a number have a more than 2 divisors not a prime number.&lt;/p&gt;

&lt;p&gt;EXAMPLE:&lt;br&gt;
✓ NO 8.This number divide by 1,2,4,8 and gets reminder 0.So 8 have four divisors and not a prime number.&lt;/p&gt;

&lt;p&gt;✓ NO 13.This number divide by 1 and 13 and gets reminder 0.so 13 have 2 divisors and prime number.&lt;/p&gt;

&lt;p&gt;PROGRAM:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Fm6afjy5tc10hq6bap2lt.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fm6afjy5tc10hq6bap2lt.jpg" alt=" " width="712" height="718"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;EXPLANATION:&lt;/p&gt;

&lt;p&gt;1.First take count=0.&lt;/p&gt;

&lt;p&gt;2.Then take number = 10.&lt;/p&gt;

&lt;p&gt;3.Next take initial value i=1.&lt;/p&gt;

&lt;p&gt;4.Then check the condition , number is 10, so take the value (i&amp;lt;=number).&lt;/p&gt;

&lt;p&gt;5.Next check the if condition (number % i == 0).&lt;/p&gt;

&lt;p&gt;◾ i is 1.(1&amp;lt;=number true).Then go next step.&lt;br&gt;
(number(10) % 1== 0 true).because the 10 is divided by 1 and the remaider is 0.Condition is true.Then,&lt;/p&gt;

&lt;p&gt;6.Increment the value of count++.&lt;/p&gt;

&lt;p&gt;7.Then increment the value of i++.&lt;/p&gt;

&lt;p&gt;◾ i is 2.(2&amp;lt;=number true).(number(10) % 2== 0 true).go to next step .count is 2.&lt;/p&gt;

&lt;p&gt;◾ i is 3.(3&amp;lt;=number true).(number(10) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 4.(4&amp;lt;=number true).(number(10) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 5.(5&amp;lt;=number true).(number(10) % 1== 0 true).&lt;br&gt;
count is 3.&lt;/p&gt;

&lt;p&gt;◾ i is 6.(6&amp;lt;=number true).(number(10) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 7.(7&amp;lt;=number true).(number(10) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 8.(8&amp;lt;=number true).(number(10) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 9.(9&amp;lt;=number true).(number(10) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 10.(10&amp;lt;=number true).(number(10) % 1== 0 true).&lt;br&gt;
count is 4.&lt;/p&gt;

&lt;p&gt;◾ i is 11.(11&amp;lt;=number false).then while loop breaks.&lt;/p&gt;

&lt;p&gt;8.Then give if(count==2)&lt;br&gt;
   Print(prime number).&lt;/p&gt;

&lt;p&gt;9.Else&lt;br&gt;
    Print(not a prime number).&lt;/p&gt;

&lt;p&gt;◾ Count is now 4.&lt;br&gt;
  ◾ if(4==2).false.Not a prime number.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F3a905ywtnz9q35ouq3n8.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F3a905ywtnz9q35ouq3n8.jpg" alt=" " width="720" height="156"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PROGRAM:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fllddpr5vs1942c8bmjo0.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fllddpr5vs1942c8bmjo0.jpg" alt=" " width="720" height="735"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;EXPLANATION:&lt;/p&gt;

&lt;p&gt;1.First take count=0.&lt;/p&gt;

&lt;p&gt;2.Then take number = 13.&lt;/p&gt;

&lt;p&gt;3.Next take initial value i=1.&lt;/p&gt;

&lt;p&gt;4.Then check the condition , number is 10, so take the value (i&amp;lt;=number).&lt;/p&gt;

&lt;p&gt;5.Next check the if condition (number % i == 0).&lt;/p&gt;

&lt;p&gt;◾ i is 1.(1&amp;lt;=number true).Then go next step.&lt;br&gt;
(number(13) % 1== 0 true).because the 13 is divided by 1 and the remaider is 0.Condition is true.So count is 1.Then,&lt;/p&gt;

&lt;p&gt;6.Increment the value of count++.&lt;/p&gt;

&lt;p&gt;7.Then increment the value of i++.&lt;/p&gt;

&lt;p&gt;◾ i is 2.(2&amp;lt;=number true).(number(13) % 2== 0 false).go to next step.&lt;/p&gt;

&lt;p&gt;◾ i is 3.(3&amp;lt;=number true).(number(13) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 4.(4&amp;lt;=number true).(number(13) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 5.(5&amp;lt;=number true).(number(13) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 6.(6&amp;lt;=number true).(number(13) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 7.(7&amp;lt;=number true).(number(13) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 8.(8&amp;lt;=number true).(number(13) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 9.(9&amp;lt;=number true).(number(13) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 10.(10&amp;lt;=number true).(number(13) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 11.(11&amp;lt;=number true).(number(13) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 12.(12&amp;lt;=number true).(number(13) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 13.(13&amp;lt;=number true).(number(13) % 1== 0 true).&lt;br&gt;
count is 2.&lt;/p&gt;

&lt;p&gt;◾ i is 14.(14&amp;lt;=number false).then while loop breaks.&lt;/p&gt;

&lt;p&gt;8.Then give if(count==2)&lt;br&gt;
   Print(prime number).&lt;/p&gt;

&lt;p&gt;9.Else&lt;br&gt;
    Print(not a prime number).&lt;/p&gt;

&lt;p&gt;◾ Count is now 2.&lt;br&gt;
  ◾ if(2==2).true.prime number.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fu7jv4yd0h8rlopgtqq4f.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fu7jv4yd0h8rlopgtqq4f.jpg" alt=" " width="711" height="153"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>learning</category>
    </item>
    <item>
      <title>Flowchart of Some While Loop Programs in Javascript</title>
      <dc:creator>Deva I</dc:creator>
      <pubDate>Fri, 27 Mar 2026 09:19:56 +0000</pubDate>
      <link>https://dev.to/deva_i_932c8869ada96d4c9f/flowchart-of-some-while-loop-programs-in-javascript-755</link>
      <guid>https://dev.to/deva_i_932c8869ada96d4c9f/flowchart-of-some-while-loop-programs-in-javascript-755</guid>
      <description>&lt;p&gt;DEFINITION OF FLOWCHART:&lt;br&gt;
✓ A flowchart is a visual diagram and a step by step process to showing the sequence of actions using the symbols, shapes and arrows&lt;/p&gt;

&lt;p&gt;✓ It's makes the easier to understand the programs step by step.&lt;/p&gt;

&lt;p&gt;PROGRAMS:&lt;br&gt;
1) 1   1   1   1   1&lt;br&gt;
FLOWCHART:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fwr24z532kuhen7sp26qb.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fwr24z532kuhen7sp26qb.jpg" alt=" " width="800" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2) 1   2   3   4   5&lt;br&gt;
FLOWCHART:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fhamb0vsxfppyvpbqhsat.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fhamb0vsxfppyvpbqhsat.jpg" alt=" " width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3) 1   3   5   7   9&lt;br&gt;
FLOWCHART:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fqc31wyw4pa0yeddvm1eh.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fqc31wyw4pa0yeddvm1eh.jpg" alt=" " width="800" height="422"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4) 3   6   9   12  15&lt;br&gt;
FLOWCHART:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fzri23gd7gzenab7pxqns.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fzri23gd7gzenab7pxqns.jpg" alt=" " width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;5) Multiples of 3 and 5 &lt;br&gt;
FLOWCHART:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F48jl2nmuc7vsbur59uyf.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F48jl2nmuc7vsbur59uyf.jpg" alt=" " width="800" height="527"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6) Multiples of 3 or 5 &lt;br&gt;
FLOWCHART:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fkxy58hb7fvsw8h5l3i0o.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fkxy58hb7fvsw8h5l3i0o.jpg" alt=" " width="800" height="506"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;7) Divisors of given number&lt;br&gt;
FLOWCHART:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fx4zo8xkgdi8eeyu78c0q.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fx4zo8xkgdi8eeyu78c0q.jpg" alt=" " width="800" height="604"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;8) Count of Divisors of given &lt;br&gt;
number&lt;br&gt;
FLOWCHART:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fiualbpmh2myfion4h4wi.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fiualbpmh2myfion4h4wi.jpg" alt=" " width="800" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;9) Prime Number&lt;br&gt;
FLOWCHART:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fjap4v3a28lflt0ymd9dz.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fjap4v3a28lflt0ymd9dz.jpg" alt=" " width="800" height="1057"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;10) Reverse Printing a number&lt;br&gt;
FLOWCHART:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fplyumo1pjarqrcrgoles.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fplyumo1pjarqrcrgoles.jpg" alt=" " width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;11) Count of Digits&lt;br&gt;
FLOWCHART:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F1ze8q5pe98bwlkeans4j.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F1ze8q5pe98bwlkeans4j.jpg" alt=" " width="800" height="484"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;12) Sum of Digits&lt;br&gt;
FLOWCHART:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fnqlps2rmckkwo3c6j4vs.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fnqlps2rmckkwo3c6j4vs.jpg" alt=" " width="800" height="598"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>learning</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Some Example Programs of While Loop Using Java Script</title>
      <dc:creator>Deva I</dc:creator>
      <pubDate>Wed, 25 Mar 2026 16:03:55 +0000</pubDate>
      <link>https://dev.to/deva_i_932c8869ada96d4c9f/some-example-programs-of-while-loop-using-java-script-4mi</link>
      <guid>https://dev.to/deva_i_932c8869ada96d4c9f/some-example-programs-of-while-loop-using-java-script-4mi</guid>
      <description>&lt;p&gt;Today I post a some example programs of while loop using Java script.this all programs are the technical Programs of some companies to ask their technical rounds.&lt;/p&gt;

&lt;p&gt;1️⃣ MULTIPLES OF 3 AND 5?&lt;/p&gt;

&lt;p&gt;To find multiples of 3 and 5 it means what number divisible by 3 and 5 is called multiples.&lt;/p&gt;

&lt;p&gt;Find the multiples use the modulo operator (%).This operator used for find a remaider value otherwise division (/) operator used for only quotient.&lt;/p&gt;

&lt;p&gt;PROGRAM:&lt;br&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.amazonaws.com%2Fuploads%2Farticles%2Ff4348zssp67gqf4dyit0.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Ff4348zssp67gqf4dyit0.jpg" alt=" " width="720" height="566"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;STEPS:&lt;/p&gt;

&lt;p&gt;✓First take the initial value&lt;br&gt;
i = 3.because 3 is starting value from given number.&lt;/p&gt;

&lt;p&gt;✓Then give the condition , assume final value is 100, so take the value (i&amp;lt;=100)&lt;/p&gt;

&lt;p&gt;✓Next check given number divisible by i,so give(i % 3 == 0 &amp;amp;&amp;amp; i % 5 == 0).&lt;/p&gt;

&lt;p&gt;✓ Print the value of i.&lt;/p&gt;

&lt;p&gt;✓Then increment the value of i.&lt;/p&gt;

&lt;p&gt;WORKING:&lt;/p&gt;

&lt;p&gt;1.First take given value 3.&lt;/p&gt;

&lt;p&gt;2.Then check the condition (i&amp;lt;=100).&lt;/p&gt;

&lt;p&gt;3.Next check the if condition (i % 3 == 0 &amp;amp;&amp;amp; i % 5 == 0)  it's makes sure the which number gets divided and gets remainder 0.&lt;/p&gt;

&lt;p&gt;◾ i is 3 .(3&amp;lt;=100 true).then check the if condition.(3%3==0 true) Because remainder is 0(0==0 true) and(&amp;amp;&amp;amp;) (3%5==0 false) remainder is 2 (2==0 false).In (&amp;amp;&amp;amp;) operator is if the both condition evaluates true print true.if one of them gets false then print false.In this program one is true and another is false&lt;/p&gt;

&lt;p&gt;◾ This process is repeated untill the both 3 and 5 gets true.&lt;/p&gt;

&lt;p&gt;◾ i is 15.(15&amp;lt;=100 true).then check the if condition.(15%3==0 true) Because remainder is 0(0==0 true) and(&amp;amp;&amp;amp;) (15%5==0 false) remainder is 0(0==0 true).both condition is true so print 15.&lt;/p&gt;

&lt;p&gt;◾ 30,45,60,75,90 these all numbers are divisible by both 3 and 5 in between 3 and 100.&lt;/p&gt;

&lt;p&gt;◾ i is 101.(101&amp;lt;=100 false).loop will breaks.&lt;/p&gt;

&lt;p&gt;4.Print i only if the condition is true.otherwise it's skip.&lt;/p&gt;

&lt;p&gt;5.Increment the value of i.again check the next value.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fwg8bguv54h3fv678yb0w.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fwg8bguv54h3fv678yb0w.jpg" alt=" " width="720" height="477"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;2️⃣ MULTIPLES OF 3 OR 5?&lt;/p&gt;

&lt;p&gt;To find the multiples of 3 or 5.&lt;/p&gt;

&lt;p&gt;PROGRAM:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fe5h019s6y63mle2xleys.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fe5h019s6y63mle2xleys.jpg" alt=" " width="720" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WORKING:&lt;/p&gt;

&lt;p&gt;1.First take given value 3.&lt;/p&gt;

&lt;p&gt;2.Then check the condition.I need the values till 50.so I take (i&amp;lt;=50).&lt;/p&gt;

&lt;p&gt;3.Next check the if condition (i % 3 == 0 || i % 5 == 0)  it's makes sure the which number gets divided and gets remainder 0.&lt;/p&gt;

&lt;p&gt;◾ i is 3 .(3&amp;lt;=50 true).then check the if condition.(3%3==0 true) Because remainder is 0(0==0 true) OR (||) (3%5==0 false) remainder is 2 (2==0 false).In (&amp;amp;&amp;amp;) operator is if the both condition evaluates true print true, but the OR(||) operator any one condition evaluates true it prints true.dosen't consider one false condition. but if both of them gets false then print false.In this program one is true and another is false.so print in next step.&lt;/p&gt;

&lt;p&gt;◾ i is 4.(4&amp;lt;=50 true).then check the if condition.(4%3==0 false)(4%5==0 false).both condition is false. so, the value not satisfy the condition.then skip.&lt;/p&gt;

&lt;p&gt;◾ This process is repeated untill the 3 or 5 anyone becomes true inbetween the 3 to 50.&lt;/p&gt;

&lt;p&gt;◾ i is 5.(5&amp;lt;=50 true).then check the if condition.(5%3==0 false) Because remainder is 0(2==0 false) and(&amp;amp;&amp;amp;) (5%5==0 true) remainder is 0(0==0 true).both condition is true so print 5.&lt;/p&gt;

&lt;p&gt;◾  these all numbers are divisible by both 3 and 5 in between 3 and 100.&lt;/p&gt;

&lt;p&gt;◾ i is 51.(51&amp;lt;=50 false).loop will breaks.&lt;/p&gt;

&lt;p&gt;4.Print i only if the condition is true.otherwise it's skip.&lt;/p&gt;

&lt;p&gt;5.Increment the value of i.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F1rlfvvlikj0lqqy3bdhn.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F1rlfvvlikj0lqqy3bdhn.jpg" alt=" " width="720" height="984"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;3️⃣ DIVISORS OF GIVEN NUMBER:&lt;/p&gt;

&lt;p&gt;Divisors of numbers means  what are the numbers divides a particular one number to gets remainder 0.&lt;br&gt;
example:12(1,2,3,4,6,12). The number 12 is divided these numbers and gets remainder 0.&lt;/p&gt;

&lt;p&gt;STEPS:&lt;/p&gt;

&lt;p&gt;✓First take the given number. I take 10.so write givennumber=10.&lt;/p&gt;

&lt;p&gt;✓Then take the initial value&lt;br&gt;
i = 1.because we don't know what the numbers are divide 10. &lt;/p&gt;

&lt;p&gt;✓Then give the condition , given value is 10, so take the value (i&amp;lt;=10)&lt;/p&gt;

&lt;p&gt;✓Next check given number divisible by i,so give(givennumber % i == 0).&lt;/p&gt;

&lt;p&gt;✓ Print the value of i.&lt;/p&gt;

&lt;p&gt;✓Then increment the value of i.&lt;/p&gt;

&lt;p&gt;PROGRAM:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fuasx70i56oh9ahj2qo4p.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fuasx70i56oh9ahj2qo4p.jpg" alt=" " width="720" height="387"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WORKING:&lt;/p&gt;

&lt;p&gt;1.First take given value 1.&lt;/p&gt;

&lt;p&gt;2.Then check the condition.(i&amp;lt;=10).&lt;/p&gt;

&lt;p&gt;◾ i is 1.(i&amp;lt;=10 true).Then go next step.&lt;/p&gt;

&lt;p&gt;3.Next check the if condition (givennumber % i == 0).&lt;/p&gt;

&lt;p&gt;◾ (givennumber(10) % 1== 0 true).because the 10 is divided by 1 and the remaider is 0.&lt;/p&gt;

&lt;p&gt;4.condition is true.so, print the number.&lt;/p&gt;

&lt;p&gt;5.i++. increment the value of i.then again go to check next value.&lt;/p&gt;

&lt;p&gt;◾ Then i is 2.(2&amp;lt;=10 true).Then go next step.&lt;/p&gt;

&lt;p&gt;◾ (givennumber(10) % 2== 0 true).because the 10 is divided by 2 and the remaider is 0.&lt;/p&gt;

&lt;p&gt;◾ Then i is 3.(3&amp;lt;=10 true).Then go next step.&lt;/p&gt;

&lt;p&gt;◾ (givennumber(10) % 3== 0 false).because the 10 is not divided by 3 and the remaider is 1.&lt;/p&gt;

&lt;p&gt;◾ Then i is 4.(4&amp;lt;=10 true).(givennumber(10) % 4== 0 false)&lt;/p&gt;

&lt;p&gt;◾ Then i is 5.(5&amp;lt;=10 true).(givennumber(10) % 5== 0 true).Then print 5.&lt;/p&gt;

&lt;p&gt;◾ Then i is 6.(6&amp;lt;=10 true).(givennumber(10) % 6== 0 false)&lt;/p&gt;

&lt;p&gt;◾ Then i is 7.(7&amp;lt;=10 true).(givennumber(10) % 7== 0 false)&lt;/p&gt;

&lt;p&gt;◾ Then i is 8.(8&amp;lt;=10 true).(givennumber(10) % 8== 0 false)&lt;/p&gt;

&lt;p&gt;◾ Then i is 9.(9&amp;lt;=10 true).(givennumber(10) % 9== 0 false)&lt;/p&gt;

&lt;p&gt;◾ Then i is 10.(10&amp;lt;=10 true).(givennumber(10) % 10== 0 true).then prints 10.&lt;/p&gt;

&lt;p&gt;◾ Then i is 11.(11&amp;lt;=10 false).then while loop breaks.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fk82kc0aiwbrm80z07rvl.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fk82kc0aiwbrm80z07rvl.jpg" alt=" " width="720" height="272"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4️⃣ COUNT OF DIVISORS OF GIVEN NUMBER:&lt;/p&gt;

&lt;p&gt;In the above program we found the divisors.In this program to find count how many divisors of number.&lt;br&gt;
Example:20(1,2,4,5,10,20).This number contains 6 divisors.&lt;/p&gt;

&lt;p&gt;STEPS:&lt;/p&gt;

&lt;p&gt;✓take the given number 10.so write givennumber=10.&lt;/p&gt;

&lt;p&gt;✓Then take the initial value i = 1.&lt;/p&gt;

&lt;p&gt;✓need a count so declare the count=0.because we don't know the count. &lt;/p&gt;

&lt;p&gt;✓Then give the condition , givennumber is 10, so take the value (i&amp;lt;=10)&lt;/p&gt;

&lt;p&gt;✓Next check given number divisible by i,so give(givennumber % i == 0).&lt;/p&gt;

&lt;p&gt;✓Need a overall count of givennumber so give count++.It's makes count=count+1.&lt;/p&gt;

&lt;p&gt;✓Then increment the value of i.&lt;/p&gt;

&lt;p&gt;✓No need to print a i value.Only wanna overall value of count.so print count to declare out of parenthesis.&lt;/p&gt;

&lt;p&gt;PROGRAM:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fvdbacuhr8nhs9e2vpyrp.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fvdbacuhr8nhs9e2vpyrp.jpg" alt=" " width="720" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;WORKING:&lt;/p&gt;

&lt;p&gt;1.First take count=0.&lt;/p&gt;

&lt;p&gt;2.Then take givennumber = 10.&lt;/p&gt;

&lt;p&gt;3.Next take initial value i=1.&lt;/p&gt;

&lt;p&gt;4.Then check the condition , givennumber is 10, so take the value (i&amp;lt;=givennumber).&lt;/p&gt;

&lt;p&gt;5.Next check the if condition (givennumber % i == 0).&lt;/p&gt;

&lt;p&gt;◾ i is 1.(1&amp;lt;=givennumber true).Then go next step.&lt;br&gt;
(givennumber(10) % 1== 0 true).because the 10 is divided by 1 and the remaider is 0.Condition is true.Then,&lt;/p&gt;

&lt;p&gt;6.Increment the value of count++.&lt;/p&gt;

&lt;p&gt;7.Then increment the value of i++.&lt;/p&gt;

&lt;p&gt;8.print the count.condition is true so, count value is 1.then again go to check while condition.&lt;/p&gt;

&lt;p&gt;◾ i is 2.(2&amp;lt;=givennumber true).(givennumber(10) % 2== 0 true).go to next step .count is 2.&lt;/p&gt;

&lt;p&gt;◾ i is 3.(3&amp;lt;=givennumber true).(givennumber(10) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 4.(4&amp;lt;=givennumber true).(givennumber(10) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 5.(5&amp;lt;=givennumber true).(givennumber(10) % 1== 0 true).&lt;br&gt;
count is 3.&lt;/p&gt;

&lt;p&gt;◾ i is 6.(6&amp;lt;=givennumber true).(givennumber(10) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 7.(7&amp;lt;=givennumber true).(givennumber(10) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 8.(8&amp;lt;=givennumber true).(givennumber(10) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 9.(9&amp;lt;=givennumber true).(givennumber(10) % 1== 0 false).&lt;/p&gt;

&lt;p&gt;◾ i is 10.(10&amp;lt;=givennumber true).(givennumber(10) % 1== 0 true).&lt;br&gt;
count is 4.&lt;/p&gt;

&lt;p&gt;◾ i is 11.(11&amp;lt;=givennumber false).then while loop breaks.&lt;/p&gt;

&lt;p&gt;OUTPUT:&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2F6qyie7e9ypd0rgauepbw.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2F6qyie7e9ypd0rgauepbw.jpg" alt=" " width="720" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>learning</category>
    </item>
    <item>
      <title>Basic About While Loop in Javascript</title>
      <dc:creator>Deva I</dc:creator>
      <pubDate>Mon, 23 Mar 2026 13:00:07 +0000</pubDate>
      <link>https://dev.to/deva_i_932c8869ada96d4c9f/basic-about-while-loop-in-javascript-3g2f</link>
      <guid>https://dev.to/deva_i_932c8869ada96d4c9f/basic-about-while-loop-in-javascript-3g2f</guid>
      <description>&lt;p&gt;WHILE LOOP:&lt;br&gt;
✓ While loop is a control flow statement that is used to execute a code repeatedly when the specified condition is true.&lt;/p&gt;

&lt;p&gt;✓ If the condition is false then the code is stop and breaks the loop.&lt;/p&gt;

&lt;p&gt;✓ If the condition never becomes false then the code will runs repeatedly.This is called infinite loop.&lt;/p&gt;

&lt;p&gt;SOME EXAMPLE PROGRAM FOR WHILE LOOP:&lt;br&gt;
1.Print 1 2 3?&lt;/p&gt;

&lt;p&gt;let i = 1; &lt;br&gt;
while (i &amp;lt;= 3) &lt;br&gt;
{&lt;br&gt;
console.log(i);&lt;br&gt;
i++;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;✓First take the initial value &lt;br&gt;
  i = 1; &lt;/p&gt;

&lt;p&gt;✓Then give the condition , our final value is 3, so take the value less than 3.&lt;/p&gt;

&lt;p&gt;✓ Print the value of i.&lt;/p&gt;

&lt;p&gt;✓Then increment the value of i.&lt;/p&gt;

&lt;p&gt;WORKING:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;First the initial value starts 1&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;2.Then check the condition it's executes when the condition evaluates true.&lt;/p&gt;

&lt;p&gt;3.Then prints the initial value 1&lt;br&gt;
i is 1 (1 &amp;lt;= 3 is true). Prints 1, then i becomes 2.&lt;/p&gt;

&lt;p&gt;i is 2 (2 &amp;lt;= 3 is true). Prints 2, then i becomes 3.&lt;/p&gt;

&lt;p&gt;i is 3 (3 &amp;lt;= 3 is true). Prints 3, then i becomes 4.&lt;/p&gt;

&lt;p&gt;Then checks i is 4. But 4 &amp;lt;= 3 is false,so the loop will stop.&lt;/p&gt;

&lt;p&gt;2.Print 3 2 1?&lt;/p&gt;

&lt;p&gt;let i = 3;&lt;br&gt;
While(i &amp;gt;= 1)&lt;br&gt;
{&lt;br&gt;
Console.log(i);&lt;br&gt;
i--;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;3.print 1 3 5 7 9?&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Feabmk95byoa6luhw20t5.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Feabmk95byoa6luhw20t5.jpg" alt=" " width="720" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;4.Print 3 6 9 12 15?&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fyaz9g769ktwu0qflqcp0.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fyaz9g769ktwu0qflqcp0.jpg" alt=" " width="720" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Print 1 4 9 16 25?&lt;/p&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.amazonaws.com%2Fuploads%2Farticles%2Fvnhjbyhz061kknbxd0mr.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fvnhjbyhz061kknbxd0mr.jpg" alt=" " width="720" height="429"&gt;&lt;/a&gt;.&lt;/p&gt;

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