JAVASCRIPT PROGRAMMING
3.67K subscribers
495 photos
3 videos
48 files
102 links
Hello! I am @imabhi3030 and welcome to the Coding channel! Here we can learn all things related to coding and improve our skills. I am always present to help you. If you need any kind of assistance, just let me know! 😊
Download Telegram
Channel created
------------------------------
Introducing myself :
------------------------------
I'm also a student like you studying BCA 3rd year, I started this channel to share the knowledge of C programming .

I try to gather as much programs as I can and share them with you, hoping you will support the channel by sharing this channel with your friends who are aiming to practice programs.

Channel link is here👇


https://t.me/javascript_programmings

If I make any mistakes in any program message me the mistake I had made so I'll try to correct them.
contact here 👇
@imabhi3030
Program to print hello world in javascript

console.log("Hello, World!");
Program to add two numbers
-------------------------------------------------
Program:

<!DOCTYPE html>
<html>
<head>
<title>Addition Example</title>
<script>
function addNumbers() {
// Get the values from the input fields
var num1 = parseFloat(document.getElementById("num1").value);
var num2 = parseFloat(document.getElementById("num2").value);

// Check if the input is valid
if (!isNaN(num1) && !isNaN(num2)) {
// Calculate the sum
var sum = num1 + num2;

// Display the result
document.getElementById("result").innerHTML = "Result: " + sum;
} else {
// Display an error message if input is not valid
document.getElementById("result").innerHTML = "Invalid input. Please enter valid numbers.";
}
}
</script>
</head>
<body>
<h1>Add Two Numbers</h1>
<label for="num1">Number 1:</label>
<input type="text" id="num1"><br>

<label for="num2">Number 2:</label>
<input type="text" id="num2"><br>

<button onclick="addNumbers()">Add</button><br>

<p id="result"></p>
</body>
</html>

-------------------------------------------------
#basicprograms
This media is not supported in your browser
VIEW IN TELEGRAM
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>

This link is Required.

<script src="https://cdn.jsdelivr.net/npm/p5@1.4.0/lib/p5.js"></script>

<script type="text/javascript">
function setup(){
createCanvas(windowWidth,
windowHeight);
}
function draw(){
const col={};
const{r,g,b}=col;
col.r=random(0,255);
col.g=random(0,255);
col.b=random(0,255);
fill(col.r,col.g,col.b)
ellipse(mouseX,mouseY,
150,100);
}
</script>
</body>
</html>
👍1😢1