COMMUNITY SESSION TODAY BATCH FSR060523 05 july

1- Create a variable called colors , assign the value Purple to it.

1 Like
var colors = "Purple";


1 Like

var colors=ā€œpurpleā€;

1 Like

var colors=ā€œpurpleā€;

1 Like

var colors = ā€œpurpleā€;

1 Like
 Here's an example of creating a variable called `colors` and assigning the value "Purple" to it:

```javascript
var colors = "Purple";

In this example, the colors variable is declared using the var keyword and assigned the string value ā€œPurpleā€. Now, we can use the colors variable to access or manipulate the value ā€œPurpleā€ throughout JavaScript code.

3 Likes

var colors = ā€œPurpleā€;

1 Like

var colors = ā€œpurpleā€;

1 Like

var colors = ā€œpurpleā€;

1 Like

var color = ā€˜purpleā€™;

1 Like

var color = ā€˜purpleā€™;

1 Like

var colors = ā€œpurpleā€

1 Like

2- Create a variable called o , assign the value 500 to it.

var colour =" Purple "

1 Like
1 Like
Here's an example of creating a variable called `o` and assigning the value 500 to it:

```javascript
var o = 500;

In this example, the o variable is declared using the var keyword and assigned the numeric value 500. Now, we can use the o variable to perform arithmetic operations, comparisons, or any other manipulations involving the value 500 within JavaScript code.

3 Likes
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <section id="demo1">
        krishna
    </section>
    <script>
var color ='purple';
    </script>
</body>

</html>
2 Likes

2- Create a variable called o , assign the value 500 to it.

var o = 500;

2 Likes

varibles :-
var o = 500;

1 Like

var colors = ā€œpurpleā€;

1 Like