<?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: Karthick (k)</title>
    <description>The latest articles on DEV Community by Karthick (k) (@karthick_07).</description>
    <link>https://dev.to/karthick_07</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%2F3924592%2Fc7d24a28-37c4-4afc-af8e-88377a701cba.png</url>
      <title>DEV Community: Karthick (k)</title>
      <link>https://dev.to/karthick_07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karthick_07"/>
    <language>en</language>
    <item>
      <title>Mastering Functions: Unleashing the Power of Code</title>
      <dc:creator>Karthick (k)</dc:creator>
      <pubDate>Fri, 12 Jun 2026 06:47:26 +0000</pubDate>
      <link>https://dev.to/karthick_07/mastering-functions-unleashing-the-power-of-code-5gka</link>
      <guid>https://dev.to/karthick_07/mastering-functions-unleashing-the-power-of-code-5gka</guid>
      <description>&lt;p&gt;&lt;strong&gt;Q1. Converting a string to Camel Case in JavaScript&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;CamelCase is a string formatting style in which the first word starts with a lowercase letter and each subsequent word starts with an uppercase letter. It is commonly used in JavaScript to name variables and functions for improved readability.&lt;/p&gt;

&lt;p&gt;The first character of the string is converted to lowercase.&lt;br&gt;
Each word after a space has its first character converted to uppercase, and spaces are removed.&lt;br&gt;
This format helps create meaningful and readable variable or function names (e.g., myVariableName).&lt;/p&gt;

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

&lt;p&gt;Functions in JavaScript are reusable blocks of code designed to perform specific tasks. They allow you to organise, reuse, and modularise code. It can take inputs, perform actions, and return outputs.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The return statement is used to send a result back from a function.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When the return executes, the function stops running at that point.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The returned value can be stored in a variable or used directly.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;`function add(a, b) {&lt;br&gt;
  return a + b; // returns the sum&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;let result = add(5, 10);&lt;br&gt;
console.log(result);`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript Hoisting&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hoisting refers to the behavior where JavaScript moves the declarations of variables, functions, and classes to the top of their scope during the compilation phase. This can sometimes lead to surprising results, especially when using var, let, const, or function expressions.&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%2Fuuj878ukz7kr8bbivb4m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fuuj878ukz7kr8bbivb4m.png" alt=" " width="800" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hoisting applies to variable and function declarations.&lt;/li&gt;
&lt;li&gt;Initialisations are not hoisted; they are only declarations.&lt;/li&gt;
&lt;li&gt;'var' variables are hoisted with undefined, while 'let' and 'const' are hoisted but remain in the Temporal Dead Zone until initialised.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>functional</category>
      <category>functionalreactiveprogramming</category>
      <category>javascript</category>
      <category>ai</category>
    </item>
    <item>
      <title>"Mastering Loops and Functions: A Dive into For Loops and Do-While Structures"</title>
      <dc:creator>Karthick (k)</dc:creator>
      <pubDate>Wed, 10 Jun 2026 06:09:40 +0000</pubDate>
      <link>https://dev.to/karthick_07/mastering-loops-and-functions-a-dive-into-for-loops-and-do-while-structures-55ph</link>
      <guid>https://dev.to/karthick_07/mastering-loops-and-functions-a-dive-into-for-loops-and-do-while-structures-55ph</guid>
      <description>&lt;p&gt;&lt;strong&gt;JavaScript For Loop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A JavaScript for loop is a control flow statement that allows code to be executed repeatedly based on a condition. It consists of three parts: initialisation, condition, and increment/decrement.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;for (statement 1 ; statement 2 ; statement 3){    code here...}&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Statement 1&lt;/strong&gt;: It is the initialisation of the counter. It is executed once before the execution of the code block.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Statement 2&lt;/strong&gt;: It defines the testing condition for executing the code block.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Statement 3&lt;/strong&gt;: It is the increment or decrement of the counter &amp;amp; executed (every time) after the code block has been executed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Flow chart&lt;/strong&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%2Fw4aoquogs4rupjje5s2l.webp" 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%2Fw4aoquogs4rupjje5s2l.webp" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example code For Loop&lt;/strong&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%2Funad0retmnqgq8r3qf3y.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Funad0retmnqgq8r3qf3y.png" alt=" " width="800" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;JavaScript do...while Loop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A do...while loop in JavaScript is a control structure where the code executes repeatedly based on a given boolean condition. It's similar to a repeating if statement. One key difference is that a do...while loop guarantees that the code block will execute at least once, regardless of whether the condition is met initially or not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Entry Controlled loops&lt;/strong&gt;: In this type of loop, the test condition is tested before entering the loop body. For loops and While Loops are entry-controlled loops.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Exit Controlled Loops&lt;/strong&gt;: In this type of loop, the test condition is tested or evaluated at the end of the loop body. Therefore, the loop body will execute at least once, irrespective of whether the test condition is true or false. The do-while loop is exit-controlled.&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%2Foqyic5od6bqi43boucvz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foqyic5od6bqi43boucvz.png" alt=" " width="514" height="225"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example code while Loop&lt;/strong&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%2F71mm1hq58qrjbk88q5lm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F71mm1hq58qrjbk88q5lm.png" alt=" " width="800" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Functions in JavaScript *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Functions in JavaScript are reusable blocks of code designed to perform specific tasks. They allow you to organise, reuse, and modularise code. It can take inputs, perform actions, and return outputs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;point 1.&lt;/strong&gt; Code Resuability&lt;br&gt;
&lt;strong&gt;point 2.&lt;/strong&gt; Modularity&lt;br&gt;
&lt;strong&gt;point 3.&lt;/strong&gt; Readability&lt;br&gt;
&lt;strong&gt;point 4.&lt;/strong&gt; Maintainability&lt;/p&gt;

&lt;p&gt;&lt;code&gt;**Syntax**&lt;br&gt;
function functionName(parameters) {&lt;br&gt;
    // function body&lt;br&gt;
    // ...&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Function declaration&lt;/strong&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%2Fuub6011mgz1nr0tzytfw.webp" 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%2Fuub6011mgz1nr0tzytfw.webp" alt=" " width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Function calling *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;As with variables, the identifier used when declaring a function acts as a symbolic name for a value. Referencing a function by identifier alone returns only the function object, and doesn't execute the function it contains:&lt;/p&gt;

&lt;p&gt;`function myFunction() {&lt;br&gt;
    console.log( "My function has been executed." );&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;myFunction();&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"My function has been executed."`&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;What is a function argument?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A function argument is a value that we pass to the function. The function parameter will represent the value. When I use parameters like name and last name, the values that I will pass, will be called arguments.&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%2F9pkreb82qumcsjuvbgi2.webp" 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%2F9pkreb82qumcsjuvbgi2.webp" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>learning</category>
      <category>coding</category>
      <category>forloop</category>
      <category>javascript</category>
    </item>
    <item>
      <title>JavaScript While Loop</title>
      <dc:creator>Karthick (k)</dc:creator>
      <pubDate>Tue, 09 Jun 2026 05:51:40 +0000</pubDate>
      <link>https://dev.to/karthick_07/javascript-while-loop-17kd</link>
      <guid>https://dev.to/karthick_07/javascript-while-loop-17kd</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction to the JavaScript while loop statement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The while loop executes a block of code as long as a specified condition is true. In JavaScript, this loop evaluates the condition before each iteration and continues running as long as the condition remains true.&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%2F17lnl1ojjce20ek1moh9.webp" 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%2F17lnl1ojjce20ek1moh9.webp" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Syntax:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;while (expression) {&lt;br&gt;
    // statement&lt;br&gt;
}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Basic JavaScript while loop example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following example uses the while statement to output the odd numbers between 1 and 10 to the console:&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%2Fom0s0nqbhifa9byv1sle.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fom0s0nqbhifa9byv1sle.png" alt=" " width="799" height="597"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>whileloop</category>
      <category>coding</category>
      <category>programming</category>
    </item>
    <item>
      <title>Mock Interview</title>
      <dc:creator>Karthick (k)</dc:creator>
      <pubDate>Mon, 08 Jun 2026 05:40:06 +0000</pubDate>
      <link>https://dev.to/karthick_07/mock-interview-54j4</link>
      <guid>https://dev.to/karthick_07/mock-interview-54j4</guid>
      <description>&lt;p&gt;Q1.Explain The Concept of Truthy &amp;amp; Falsy Values in JavaScript.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Are Truthy Values?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Truthy values are values that are evaluated to be true when used in a Boolean context. Simply put, any value that is not explicitly falsy is considered truthy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Are Falsy Values?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Falsy values are values that evaluate to false when used in a Boolean. JavaScript has a fixed list of falsy values.&lt;/p&gt;

&lt;p&gt;Q2. Variable scope in JavaScript.&lt;/p&gt;

&lt;p&gt;Scope and lifetime of variables in Java with examples ...The scope of a variable refers to the specific region of your code where that variable is visible and accessible. It dictates which parts of your program can "see" or manipulate a variable, determining both its accessibility and its lifetime (how long it stays in memory).&lt;/p&gt;

&lt;p&gt;Q4.parseInt()&lt;/p&gt;

&lt;p&gt;The parseInt() function parses a string argument and returns an integer of the specified radix (the base in mathematical numeral systems).&lt;/p&gt;

&lt;p&gt;These are questions,I have written Blogs and read and write&lt;/p&gt;

&lt;p&gt;Q3.Default Statement and Q5.Data types in JS and Q6: What is typecasting in JS, and Q7: What are HTML Attributes, and Q8.What is the position: then Relative and Absolute&lt;/p&gt;

&lt;p&gt;Self-Introduction Impore:&lt;strong&gt;TBD&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>career</category>
      <category>ai</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>JavaScript scenario questions (Variables, operators, conditional Statements)</title>
      <dc:creator>Karthick (k)</dc:creator>
      <pubDate>Sun, 07 Jun 2026 16:17:52 +0000</pubDate>
      <link>https://dev.to/karthick_07/javascript-scenario-questions-variables-operators-conditional-statements-1ocl</link>
      <guid>https://dev.to/karthick_07/javascript-scenario-questions-variables-operators-conditional-statements-1ocl</guid>
      <description>&lt;p&gt;Q3. Store a student’s marks in 3 subjects and calculate the total.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let Tamil=90&lt;br&gt;
        let English=89&lt;br&gt;
        let maths=55&lt;br&gt;
        Total=Tamil+English+maths&lt;br&gt;
        console.log(&lt;/code&gt;subjects and calculate total.${Total}&lt;code&gt;);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Q4. Swap two numbers without using a third variable.&lt;br&gt;
&lt;code&gt;&lt;br&gt;
        let A=10&lt;br&gt;
        let B=15&lt;br&gt;
        A=A+B&lt;br&gt;
        B=A-B&lt;br&gt;
        A=A-B&lt;br&gt;
        console.log(A)&lt;br&gt;
        console.log(B)&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
Q5. Create a variable that stores whether a user is logged in or not, and show a welcome message.&lt;/p&gt;

&lt;p&gt;`        let user_name=" I am Karthick."&lt;br&gt;
        let Login=true&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    if (Login)
    {
        console.log(`Welcome ${user_name}`)
    }
    else{
        console.log("Please login")
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;`&lt;br&gt;
Q6. An e-commerce website gives a 10% discount. Calculate the final price.&lt;/p&gt;

&lt;p&gt;`        let Actual_price=10000&lt;br&gt;
        let discount=20&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    let Total_price;

    Total_price=Actual_price

    let price=Total_price-Total_price/discount

    let discount_price=price

    console.log("Final price : "+discount_price)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
Q7. Check whether a number is even or odd using an operator.&lt;br&gt;
&lt;/code&gt;        let Given_number=89&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    if (Given_number%2==0){
        console.log('It is Even Number')
    }
    else{
        console.log('It is odd number')
    }`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Q8.Compare two passwords entered by the user.&lt;/p&gt;

&lt;p&gt;`        let User_1="Karthick_06";&lt;br&gt;
        let User_2="KJkjkhgg_08";&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    if (User_1 == User_2){
        console.log('it is True')
    }
    else{
        console.log('it is False')
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;`&lt;/p&gt;

&lt;p&gt;Q9.A person is eligible to vote if their age is &amp;gt;= 18. Write a condition.&lt;/p&gt;

&lt;p&gt;`        let person_age=27&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    if (person_age&amp;gt;=18)
    {
        console.log('Eligible for vote')
    }
    else{
        console.log('Not Eligible for vote')
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;code&gt;&lt;br&gt;
Q10. Use logical AND to check:&lt;br&gt;
User is logged in, User is admin, then allow dashboard access.&lt;br&gt;
&lt;/code&gt;        let userlogin=true&lt;br&gt;
        let user="Admin"&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    if (userlogin &amp;amp;&amp;amp; user == "Admin"){
        console.log('Welcome to Dashbord')
    }
    else{
        console.log('Access Deneid')
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;`&lt;/p&gt;

&lt;p&gt;Q11.Create a function that calculates the total cart amount.&lt;/p&gt;

&lt;p&gt;`        function cart_total(){&lt;br&gt;
            let item1=500;&lt;br&gt;
            let item2=1000;&lt;br&gt;
            let item3=300;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        let total=item1+item2+item3
        console.log("Total amount :",total)
    }`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Q12. Create a function to greet a user by name.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;function greet(username){&lt;br&gt;
            console.log("Welcome"+" "+username+"!")&lt;br&gt;
        }&lt;br&gt;
        greet("Karthick")&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Q13.Create a function to convert Celsius to Fahrenheit.&lt;/p&gt;

&lt;p&gt;`        function converts(celsius){&lt;br&gt;
            return (celsius* 9/5)+32;&lt;br&gt;
        }&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    let celsius=42;
    let fahrenhint=converts(celsius);
    console.log(fahrenhint)`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Q14.Create a function that returns the largest of two numbers.&lt;br&gt;
&lt;code&gt;function largest(n1,n2){&lt;br&gt;
            if (n1&amp;gt;n2){&lt;br&gt;
                return n1;&lt;br&gt;
            }&lt;br&gt;
            else if (n2&amp;gt;n1){&lt;br&gt;
                return n2;&lt;br&gt;
            }&lt;br&gt;
            else{&lt;br&gt;
                return ("Both are the same")&lt;br&gt;
            }&lt;br&gt;
        }&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
    </item>
    <item>
      <title>JavaScript scenario questions (Variables, operators, conditional Statements)</title>
      <dc:creator>Karthick (k)</dc:creator>
      <pubDate>Sat, 06 Jun 2026 15:36:09 +0000</pubDate>
      <link>https://dev.to/karthick_07/javascript-scenario-questions-variables-operators-conditional-statements-547k</link>
      <guid>https://dev.to/karthick_07/javascript-scenario-questions-variables-operators-conditional-statements-547k</guid>
      <description>&lt;p&gt;Q1.You are building a login system. Store username and password in variables and check whether both are filled.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Login System&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;username&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Karthi_09&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Karthi_09&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;

        &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;username&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Login Successfully&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Both are filled&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Q2. Create variables to store a product’s name, price, and stock. Print a message like:iPhone costs ₹60000, and only 5 are left in stock.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;Product_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;iphone&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;product_price&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$60000&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;stock&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;

        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`The &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;Product_name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; costs &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;product_price&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; and only &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;stock&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; left in stock`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;Q3. Store a student’s marks in 3 subjects and calculate the total.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;Tamil&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;90&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;English&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;89&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;maths&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;55&lt;/span&gt;
        &lt;span class="nx"&gt;Total&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;Tamil&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;English&lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="nx"&gt;maths&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`subjects and calculate total.&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;Total&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Become a pro in JavaScript</title>
      <dc:creator>Karthick (k)</dc:creator>
      <pubDate>Fri, 05 Jun 2026 06:52:27 +0000</pubDate>
      <link>https://dev.to/karthick_07/become-a-pro-in-javascript-1314</link>
      <guid>https://dev.to/karthick_07/become-a-pro-in-javascript-1314</guid>
      <description>&lt;p&gt;&lt;strong&gt;Q1.JavaScript console.log() Method.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, the console.log() method is a built-in JavaScript function that outputs messages to the console, which is a special area in web browsers or runtime environments for developers to view information about their code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It is primarily used for&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Debugging code&lt;br&gt;
Inspecting variables&lt;br&gt;
Tracking the flow of execution&lt;br&gt;
Logging errors or warnings&lt;/p&gt;

&lt;p&gt;&lt;code&gt;console.log("");&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q2.Exponentiation (&lt;/strong&gt;)**&lt;/p&gt;

&lt;p&gt;The exponentiation (**) operator returns the result of raising the first operand to the power of the second operand. It is equivalent to Math.pow(), except it also accepts BigInts as operands.&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%2Fia713rkhkjz911zi6nff.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fia713rkhkjz911zi6nff.png" alt=" " width="799" height="365"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q3.Operator precedence&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Operator precedence determines how operators are parsed with respect to each other. Operators with higher precedence become the operands of operators with lower precedence.&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%2F0aoouobepnc54a5amvna.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0aoouobepnc54a5amvna.png" alt=" " width="799" height="370"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q4. What are chaining assignments in JavaScript?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Chaining assignments in JavaScript is a syntax pattern that allows you to assign a single value to multiple variables in a single line of code.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let a, b, c;&lt;br&gt;
a = b = c = 10;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q5.Conditional (ternary) operator:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The conditional (ternary) operator is the only JavaScript operator that takes three operands: a condition followed by a question mark (?), then an expression to execute if the condition is truthy, followed by a colon (:), and finally the expression to execute if the condition is falsy. This operator is frequently used as an alternative to an if...else statement.&lt;/p&gt;

&lt;p&gt;`Syntax&lt;/p&gt;

&lt;p&gt;(condition) ? expression1 : expression2&lt;br&gt;
`&lt;br&gt;
&lt;strong&gt;Q5.Scope of Variables in JavaScript&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Global Scope&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A global variable refers to a variable that is declared outside any function or block, so it can be used anywhere in the program, both inside functions and in the main code.&lt;/p&gt;

&lt;p&gt;`// Global Variable accessed from within a function &lt;br&gt;
const x = 10;&lt;/p&gt;

&lt;p&gt;function fun1() {&lt;br&gt;
    console.log(x);&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;fun1();`&lt;/p&gt;

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

&lt;p&gt;A local variable is a variable declared inside a function, making it accessible only within that function. It cannot be used outside the function.&lt;/p&gt;

&lt;p&gt;Functions are objects and can be assigned to variables.&lt;/p&gt;

&lt;p&gt;`function fun2(){&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// This variable is local to fun2() and 
// cannot be accessed outside this function
let x = 10;
console.log(x);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;fun2();&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q6.The break Statement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The break statement is used to exit a loop when a certain condition is satisfied. It is commonly used when searching for a specific value in an array or when an early exit from a loop is required.&lt;/p&gt;

&lt;p&gt;`Syntax&lt;/p&gt;

&lt;p&gt;break;`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q7.The Continue statement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The continue statement skips the current iteration of the loop and moves to the next iteration without terminating the loop.&lt;/p&gt;

&lt;p&gt;`Syntax&lt;/p&gt;

&lt;p&gt;continue;`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q8 .How the switch Statement Works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, a *&lt;em&gt;switch statement *&lt;/em&gt; is a control-flow mechanism that evaluates an expression and matches its value against multiple case clauses to execute specific code blocks. &lt;/p&gt;

&lt;p&gt;`const fruit = "Apple";&lt;/p&gt;

&lt;p&gt;switch (fruit) {&lt;br&gt;
  case "Banana":&lt;br&gt;
    console.log("Bananas are yellow.");&lt;br&gt;
    break;&lt;br&gt;
  case "Apple":&lt;br&gt;
    console.log("Apples are red or green.");&lt;br&gt;
    break;&lt;br&gt;
  default:&lt;br&gt;
    console.log("Unknown fruit.");&lt;br&gt;
}&lt;br&gt;
// Output: "Apples are red or green."&lt;br&gt;
`&lt;br&gt;
&lt;strong&gt;Key Rules for Using default&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, the default clause in a switch statement acts as a fallback that executes when none of the specified case values matches the given expression. It serves the same purpose as the final else block in an if-else chain&lt;/p&gt;

&lt;p&gt;`const expression = "orange";&lt;/p&gt;

&lt;p&gt;switch (expression) {&lt;br&gt;
  case "apple":&lt;br&gt;
    console.log("Apples are $1.00");&lt;br&gt;
    break;&lt;br&gt;
  case "banana":&lt;br&gt;
    console.log("Bananas are $0.50");&lt;br&gt;
    break;&lt;br&gt;
  &lt;strong&gt;default: // Executes if expression is neither "apple" nor "banana"&lt;br&gt;
    console.log("Item not found");&lt;br&gt;
    break;&lt;/strong&gt;&lt;br&gt;
}`&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>webdev</category>
      <category>node</category>
    </item>
    <item>
      <title>Conditional branching: if, '?'</title>
      <dc:creator>Karthick (k)</dc:creator>
      <pubDate>Thu, 04 Jun 2026 06:29:09 +0000</pubDate>
      <link>https://dev.to/karthick_07/conditional-branching-if--4lb9</link>
      <guid>https://dev.to/karthick_07/conditional-branching-if--4lb9</guid>
      <description>&lt;p&gt;&lt;strong&gt;Q1, JavaScript - Conditional Statements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;JavaScript conditional statements are used to make decisions in a program based on given conditions. They control the flow of execution by running different code blocks depending on whether a condition is true or false.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Conditions are evaluated using comparison and logical operators.&lt;/li&gt;
&lt;li&gt;They help in building dynamic and interactive applications by responding to different inputs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Types of Conditional Statements&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. if Statement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The if statement checks a condition written inside parentheses. If the condition evaluates to true, the code inside {} is executed; otherwise, it is skipped.&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%2Fjl7br4dha3qicxjqukyt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjl7br4dha3qicxjqukyt.png" alt=" " width="531" height="341"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;if (condition) {&lt;br&gt;
  // code runs if the condition is true&lt;br&gt;
}&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;2. if-else Statement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The if-else statement executes one block of code if a condition is true and another block if it is false. It ensures that exactly one of the two code blocks runs.&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%2Fbqv4yq0eq3gk7es997r8.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%2Fbqv4yq0eq3gk7es997r8.jpg" alt=" " width="515" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. else if Statement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The else if statement is used to test multiple conditions in sequence. It executes the first block whose condition evaluates to true.&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%2F03vwlw0byvqcgf0t0v1q.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%2F03vwlw0byvqcgf0t0v1q.jpg" alt=" " width="513" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Q2.Explain The Concept of Truthy &amp;amp; Falsy Values in JavaScript&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In JavaScript, truthy and falsy values are concepts related to Boolean evaluation. Every value in JavaScript has an inherent boolean "truthiness" or "falsiness," which means they can be implicitly evaluated to true or false in boolean contexts, such as in conditional statements or logical operations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Are Truthy Values?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Truthy values are values that are evaluated to be true when used in a Boolean context. Simply put, any value that is not explicitly falsy is considered truthy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;These are some truthy values&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Non-zero numbers: 42, -1, 3.14&lt;br&gt;
Non-empty strings: "hello", "0", " "&lt;br&gt;
Objects and arrays: {}, []&lt;br&gt;
Functions: function() {}&lt;br&gt;
Dates: new Date()&lt;br&gt;
Symbols: Symbol()&lt;br&gt;
BigInt values other than 0n: 10n&lt;/p&gt;

&lt;p&gt;&lt;code&gt;if (42) console.log("This is truthy!");&lt;br&gt;
if ("hello") console.log("Non-empty strings are truthy!");&lt;br&gt;
if ({}) console.log("Objects are truthy!");&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Are Falsy Values?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Falsy values are values that evaluate to false when used in a Boolean. JavaScript has a fixed list of falsy values&lt;/p&gt;

&lt;p&gt;false&lt;br&gt;
0 (and -0)&lt;br&gt;
0n (BigInt zero)&lt;br&gt;
"" (empty string)&lt;br&gt;
null&lt;br&gt;
undefined&lt;br&gt;
NaN&lt;br&gt;
document. all (used for backward compatibility)&lt;/p&gt;

&lt;p&gt;&lt;code&gt;if (0) console.log("This won't run because 0 is falsy.");&lt;br&gt;
if ("") console.log("This won't run because an empty string is falsy.");&lt;br&gt;
if (null) console.log("This won't run because null is falsy.");&lt;/code&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>javascriptlibraries</category>
      <category>node</category>
      <category>hotwire</category>
    </item>
    <item>
      <title>JavaScript Tutorial</title>
      <dc:creator>Karthick (k)</dc:creator>
      <pubDate>Wed, 03 Jun 2026 05:49:28 +0000</pubDate>
      <link>https://dev.to/karthick_07/javascript-tutorial-4103</link>
      <guid>https://dev.to/karthick_07/javascript-tutorial-4103</guid>
      <description>&lt;p&gt;Q1.Primitive and Non-primitive data-types in JavaScript.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Primitive Data Types.&lt;br&gt;
Primitive data types are the built-in data types provided by JavaScript. They represent single values and are immutable, meaning their values cannot be changed directly after creation. JavaScript supports the following primitive data types:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Non-primitive Data Types&lt;br&gt;
Non-primitive data types, also known as reference types, are objects and derived data types. They can store collections of values or more complex entities. The two key non-primitive data &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Q2.JavaScript Number parseInt() Method.&lt;/p&gt;

&lt;p&gt;The parseInt() method parses a value by converting it to a string and returns the first integer found. It also accepts an optional radix parameter that specifies the base of the numeral system.&lt;/p&gt;

&lt;p&gt;Converts a string into an integer value.&lt;br&gt;
Supports different number systems using the radix parameter.&lt;br&gt;
Stops parsing when a non-numeric character is encountered.&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%2Ftxu19ilgwmsjarbesm0w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftxu19ilgwmsjarbesm0w.png" alt=" " width="800" height="97"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Q3:JavaScript Number parseFloat() Method.&lt;/p&gt;

&lt;p&gt;The JavaScript parseFloat() method accepts a string and converts it to a floating-point number. If the string does not contain a numerical value, or if the first character of the string is not a number, then it returns NaN, i.e., not a number. It actually returns a floating-point number parsed up to that point where it encounters a character that is not a Number. &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%2Fgalr0xybocpzr4eanrtj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgalr0xybocpzr4eanrtj.png" alt=" " width="511" height="125"&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%2Fi6r17u7d3oyg42yy69r7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi6r17u7d3oyg42yy69r7.png" alt=" " width="726" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Q4:Post-Increment (x++) || Pre-Increment (++x) &amp;amp;&amp;amp; Pre-Decrement (--x) || Post-Decrement (x--).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Post-Increment (x++):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The post-increment operator evaluates the current expression using the variable's original value, and then adds 1 to the variable right after.&lt;/p&gt;

&lt;p&gt;`let x = 5;&lt;br&gt;
let y = x++; // y gets the original value (5), then x becomes 6&lt;/p&gt;

&lt;p&gt;console.log(y); // Output: 5&lt;br&gt;
console.log(x); // Output: 6&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pre-Increment (++x):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The pre-increment operator adds 1 to the variable first, and then returns the newly updated value to the expression&lt;/p&gt;

&lt;p&gt;`let x = 5;&lt;br&gt;
let y = ++x; // x becomes 6 first, then y gets the new value (6)&lt;/p&gt;

&lt;p&gt;console.log(y); // Output: 6&lt;br&gt;
console.log(x); // Output: 6&lt;br&gt;
`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pre-Decrement (--x):&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In a prefix operation, JavaScript updates the variable instantly before evaluating the rest of the statement&lt;/p&gt;

&lt;p&gt;`let x = 5;&lt;/p&gt;

&lt;p&gt;// Decrements x to 4, then returns 4 to be assigned to 'result'&lt;br&gt;
let result = --x; &lt;/p&gt;

&lt;p&gt;console.log(result); // Output: 4&lt;br&gt;
console.log(x);      // Output: 4`&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Post-Decrement (x--)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In a postfix operation, JavaScript saves the original value to use in the expression, then subtracts 1 from the variable behind the scenes&lt;/p&gt;

&lt;p&gt;`let y = 5;&lt;/p&gt;

&lt;p&gt;// Returns the original value (5) to 'result', then decrements y to 4&lt;br&gt;
let result = y--; &lt;/p&gt;

&lt;p&gt;console.log(result); // Output: 5 (the old value)&lt;br&gt;
console.log(y);      // Output: 4 (the updated value)`&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>javascriptlibraries</category>
      <category>programming</category>
    </item>
    <item>
      <title>Introduction - JavaScript</title>
      <dc:creator>Karthick (k)</dc:creator>
      <pubDate>Tue, 02 Jun 2026 06:45:37 +0000</pubDate>
      <link>https://dev.to/karthick_07/introduction-javascript-35b6</link>
      <guid>https://dev.to/karthick_07/introduction-javascript-35b6</guid>
      <description>&lt;p&gt;Q1. Client-side scripting : &lt;/p&gt;

&lt;p&gt;Web browsers execute client-side scripting. It is used when browsers have all the code. Source code is used to transfer from the web server to the user's computer over the internet and run directly in browsers. It is also used for validations and functionality for user events. &lt;/p&gt;

&lt;p&gt;Q2. Server-side scripting : &lt;/p&gt;

&lt;p&gt;Web servers are used to execute server-side scripting. They are basically used to create dynamic pages. It can also access the file system residing on the web server. A server-side environment that runs on a scripting language is a web server. &lt;/p&gt;

&lt;p&gt;Q3.What is Localhost?&lt;/p&gt;

&lt;p&gt;In computer networking, a host means a “server”. Just like you can put a website on the internet by hosting it on a server, you can make your own computer that serves as a server. This connection is called loopback. The IP address for that loopback is 127.0.0.1.&lt;/p&gt;

&lt;p&gt;Q4.JavaScript Data Types&lt;/p&gt;

&lt;p&gt;JavaScript data types define what kind of values a variable can hold and how those values behave in a program. They determine how data is stored in memory and how operations like comparison, calculation, and conversion work.&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%2Fo08tb0qawcmgarg4edez.webp" 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%2Fo08tb0qawcmgarg4edez.webp" alt=" " width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Q5.Here is a list of JavaScript Engines for major Internet browsers:&lt;/p&gt;

&lt;p&gt;V8 — JavaScript Engine developed by Google for Chrome&lt;br&gt;
SpiderMonkey — The JavaScript Engine used by Mozilla Firefox&lt;br&gt;
JavaScriptCore — Developed by Apple for Safari&lt;br&gt;
Rhino — Managed by Mozilla Foundation for Firefox&lt;br&gt;
Chakra — A JavaScript Engine for Microsoft Edge&lt;br&gt;
JerryScript — A JavaScript Engine employed for the Internet of Things (IoT).&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%2Fu7a21lfz3besdnt7y5tj.webp" 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%2Fu7a21lfz3besdnt7y5tj.webp" alt=" " width="444" height="283"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Q8.JavaScript Operators&lt;/p&gt;

&lt;p&gt;JavaScript operators are symbols or keywords used to perform operations on values and variables. They are the building blocks of JavaScript expressions and can manipulate data in various ways.&lt;/p&gt;

&lt;p&gt;&amp;amp;--&amp;gt;JavaScript Arithmetic Operators&lt;/p&gt;

&lt;p&gt;Arithmetic Operators perform mathematical operations such as addition, subtraction, and multiplication.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const sum = 5 + 3; // Addition&lt;br&gt;
const diff = 10 - 2; // Subtraction&lt;br&gt;
const p = 4 * 2; // Multiplication&lt;br&gt;
const q = 8 / 2; // Division&lt;br&gt;
console.log(sum, diff, p, q);&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&amp;amp;--&amp;gt; JavaScript Assignment Operators&lt;/p&gt;

&lt;p&gt;Assignment operators are used to assign values to variables. They can also perform operations like addition or multiplication while assigning the value.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let n = 10;&lt;br&gt;
n += 5;&lt;br&gt;
n *= 2;&lt;br&gt;
console.log(n);&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&amp;amp;--&amp;gt; JavaScript Comparison Operators&lt;/p&gt;

&lt;p&gt;Comparison operators compare two values and return a Boolean (true or false). They are useful for making decisions in conditional statements.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;console.log(10 &amp;gt; 5);&lt;br&gt;
console.log(10 === "10");&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&amp;amp;--&amp;gt; JavaScript Logical Operators&lt;/p&gt;

&lt;p&gt;Logical operators are mainly used to perform logical operations that determine equality or difference between values.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const a = true, b = false;&lt;br&gt;
console.log(a &amp;amp;&amp;amp; b); // Logical AND&lt;br&gt;
console.log(a || b); // Logical OR&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&amp;amp;--&amp;gt; JavaScript Bitwise Operators&lt;/p&gt;

&lt;p&gt;Bitwise operators perform operations on binary representations of numbers.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const res = 5 &amp;amp; 1; // Bitwise AND&lt;br&gt;
console.log(res);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&amp;amp;--&amp;gt; JavaScript Ternary Operator&lt;/p&gt;

&lt;p&gt;The ternary operator is a shorthand for conditional statements. It takes three operands.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const age = 18;&lt;br&gt;
const status = age &amp;gt;= 18 ? "Adult": "Minor";&lt;br&gt;
console.log(status);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&amp;amp;--&amp;gt; JavaScript Comma Operator&lt;/p&gt;

&lt;p&gt;Comma Operator (,) mainly evaluates its operands from left to right sequentially and returns the value of the rightmost operand. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;let n1, n2&lt;br&gt;
const res = (n1 = 1, n2 = 2, n1 + n2);&lt;br&gt;
console.log(res);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&amp;amp;--&amp;gt; JavaScript Unary Operators&lt;/p&gt;

&lt;p&gt;Unary operators operate on a single operand (e.g., increment, decrement).&lt;/p&gt;

&lt;p&gt;`let x = 5;&lt;/p&gt;

&lt;p&gt;console.log(+x);&lt;br&gt;
console.log(-x);&lt;/p&gt;

&lt;p&gt;console.log(++x);&lt;br&gt;
console.log(--x);&lt;/p&gt;

&lt;p&gt;console.log(!x);`&lt;/p&gt;

&lt;p&gt;&amp;amp;--&amp;gt; JavaScript Relational Operators&lt;/p&gt;

&lt;p&gt;JavaScript Relational operators are used to compare their operands and determine the relationship between them. They return a Boolean value (true or false) based on the comparison result.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const obj = { length: 10 };&lt;br&gt;
console.log("length" in obj);&lt;br&gt;
console.log([] instanceof Array);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&amp;amp;--&amp;gt; JavaScript BigInt Operators&lt;/p&gt;

&lt;p&gt;BigInt operators allow calculations with numbers beyond the safe integer range.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const big1 = 123456789012345678901234567890n;&lt;br&gt;
const big2 = 987654321098765432109876543210n;&lt;br&gt;
console.log(big1 + big2);&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&amp;amp;--&amp;gt; JavaScript String Operators&lt;/p&gt;

&lt;p&gt;JavaScript String Operators include concatenation (+) and concatenation assignment (+=), used to join strings or combine strings with other data types.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const s = "Hello" + " " + "World";&lt;br&gt;
console.log(s);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&amp;amp;--&amp;gt; JavaScript Chaining Operator (?.)&lt;/p&gt;

&lt;p&gt;The optional chaining operator allows safe access to deeply nested properties without throwing errors if the property doesn’t exist.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const obj = { name: "Aman", address: { city: "Delhi" } };&lt;br&gt;
console.log(obj.address?.city);&lt;br&gt;
console.log(obj.contact?.phone);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Q8:typeof&lt;/p&gt;

&lt;p&gt;The typeof operator returns a string indicating the type of the operand's value.&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%2Fsihx7gqtjyxq8k93vdno.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsihx7gqtjyxq8k93vdno.png" alt=" " width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Q9:JavaScript Type Conversion&lt;/p&gt;

&lt;p&gt;In JavaScript, Type Conversion can be defined as converting the data type of the variables from one type to another manually by the programmer(explicitly) or automatically by JavaScript(implicitly).&lt;/p&gt;

&lt;p&gt;Implicit Type Conversion (Coercion): Implicit Type Conversion occurs automatically in JavaScript.&lt;/p&gt;

&lt;p&gt;Explicit Type Conversion: Explicit Type Conversion occurs when the programmer manually changes the type of the variables using the functions Number(), String(), and Boolean().&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>JavaScript Introduction</title>
      <dc:creator>Karthick (k)</dc:creator>
      <pubDate>Mon, 01 Jun 2026 06:27:07 +0000</pubDate>
      <link>https://dev.to/karthick_07/javascript-introduction-1maf</link>
      <guid>https://dev.to/karthick_07/javascript-introduction-1maf</guid>
      <description>&lt;p&gt;Q1.ASCII Values Alphabets ( A-Z, a-z &amp;amp; Special Character Table )&lt;/p&gt;

&lt;p&gt;ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns unique numeric values to letters, digits, punctuation marks and symbols. Since computers work only with binary data (0s and 1s), ASCII acts as a bridge by converting human-readable characters into machine-readable numbers.&lt;/p&gt;

&lt;p&gt;Q2.Binary Number System&lt;/p&gt;

&lt;p&gt;The Binary Number System, also known as the base-2 system, uses only two digits, '0' and '1', to represent numbers. It forms the fundamental basis for how computers process and store data. This base-2 system is the backbone of how computers process and store information, representing everything from text to images as sequences of 0s and 1s.&lt;/p&gt;

&lt;p&gt;Q3 Compiler and Interpreter &lt;/p&gt;

&lt;p&gt;Compiler:&lt;/p&gt;

&lt;p&gt;A compiler is a software program that transforms high‐level source code that is written by a developer in a high‐level programming language into low-level object code (binary code) in machine language, which can be understood by the processor. The process of converting high‐level programming into machine language is known as compilation. &lt;/p&gt;

&lt;p&gt;Interpreter:&lt;/p&gt;

&lt;p&gt;An interpreter transforms or interprets a high‐level programming code into code that can be understood by the machine (machine code) or into an intermediate language that can be easily executed as well. The interpreter reads each statement of code and then converts or executes it directly.&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%2Fif8i0l6km0kf9i48kncx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fif8i0l6km0kf9i48kncx.png" alt=" " width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Q4.What is a byte?&lt;/p&gt;

&lt;p&gt;In most computer systems, a byte is a unit of data that is eight binary digits long. A byte is the unit most computers use to represent a character, such as a letter, number or typographic symbol.&lt;/p&gt;

&lt;p&gt;Q5.Introduction to JavaScript&lt;/p&gt;

&lt;p&gt;JavaScript is a versatile, dynamically typed programming language that brings web pages to life by making them interactive. It is used for building interactive web applications and supports both client-side and server-side development.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Interpreted language: Code is executed line by line.&lt;/li&gt;
&lt;li&gt;Dynamically typed: Variable types are determined at runtime.&lt;/li&gt;
&lt;li&gt;Single-threaded: Executes one task at a time (but supports asynchronous operations).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Q6.JavaScript Variables&lt;/p&gt;

&lt;p&gt;Variables in JavaScript are used to store data values. They can be declared in different ways depending on how the value should behave.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Variables can be declared using var, let, or const.&lt;/li&gt;
&lt;li&gt;JavaScript is dynamically typed, so types are decided at runtime.&lt;/li&gt;
&lt;li&gt;You don’t need to specify a data type when creating a variable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Declaring Variables in JavaScript&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ES6 Introduction: let and const were introduced to provide safer alternatives for declaring variables.&lt;/li&gt;
&lt;li&gt;Scope: let and const are block-scoped (limited to { } block) or global-scoped, reducing errors compared to var.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;var keyword
var is a keyword in JavaScript used to declare variables; it is Function-scoped and hoisted, allowing redeclaration, but it can lead to unexpected bugs.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;code&gt;var a = "Hello Geeks";&lt;br&gt;
var b = 10;&lt;br&gt;
console.log(a);&lt;br&gt;
console.log(b);&lt;br&gt;
&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;let keyword&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;let is a keyword in JavaScript used to declare variables,and it is Block-scoped and not hoisted to the top, suitable for mutable variables&lt;/p&gt;

&lt;p&gt;&lt;code&gt;let a = 12&lt;br&gt;
let b = "gfg";&lt;br&gt;
console.log(a);&lt;br&gt;
console.log(b);&lt;/code&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;const keyword&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;const is a keyword in JavaScript used to declare variables, and it is Block-scoped, immutable bindings that can't be reassigned, though objects can still be mutated.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const a = 5&lt;br&gt;
let b = "gfg";&lt;br&gt;
console.log(a);&lt;br&gt;
console.log(b);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Q7.Core Key Features of ES6&lt;/p&gt;

&lt;p&gt;ES6, which stands for ECMAScript 6, is the sixth major edition of the ECMAScript standard that defines how JavaScript works. Released in June 2015 and officially named ECMAScript 2015, it introduced the most significant syntax updates and features to JavaScript since its inception&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>typescript</category>
      <category>ecmascript</category>
    </item>
    <item>
      <title>CSS variable</title>
      <dc:creator>Karthick (k)</dc:creator>
      <pubDate>Sat, 30 May 2026 17:11:07 +0000</pubDate>
      <link>https://dev.to/karthick_07/css-variable-4l1f</link>
      <guid>https://dev.to/karthick_07/css-variable-4l1f</guid>
      <description>&lt;p&gt;Q1.padding: var(--section-pad);&lt;/p&gt;

&lt;p&gt;This applies internal spacing (padding) to an element using a CSS variable. Instead of writing a fixed size like 20px or 2rem, the browser checks your CSS for-- section-pad (usually defined at the top of your stylesheet) and uses that specific value.&lt;/p&gt;

&lt;p&gt;Q2. What are:: before and:: after?&lt;/p&gt;

&lt;p&gt;These are CSS pseudo-elements. They allow you to create virtual boxes in your HTML that are styled by CSS but don't actually exist in your physical HTML file.&lt;br&gt;
.::before creates a virtual element before the actual content of your target box.::after creates a virtual element after the actual content. Crucial Rule: They require the content: ""; property to work at all (even if the quotation marks are empty).&lt;br&gt;
Common Uses: CSS variable, adding decorative icons or text before a heading.Creating background shapes, underlines, or borders without adding extra &lt;/p&gt; tags to your HTML

</description>
      <category>css</category>
      <category>tailwindcss</category>
      <category>ionic</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
