shubh - HTMLify profile

shubh's Profile Picture

shubh

87 Files

18952 Views

Latest files of /shubh/javascript

DOM Manipulation.js shubh/javascript/DOM Manipulation.js
132 Views
0 Comments
//DOM Manipulation in JS...
// Selecting With id
document.getElementById("myId");

// Selecting With class
document.getElementByClassName("className");

// Selecting With tag
StringMethods.js shubh/javascript/StringMethods.js
125 Views
0 Comments
//String Methods
//str.toUpperCase()
let str="Shubh";
console.log(str.toUpperCase());

//str.toLowerCase()
let str="Shubh";
console.log(str.toLowerCase());
innerText.html shubh/javascript/innerText.html
344 Views
0 Comments
// DOM Manipulation
// innerText properties

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
ToggleButton.html shubh/javascript/ToggleButton.html
305 Views
0 Comments
// Toggle Button to switch light theme to dark..
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Toggle Button</title>
<style>
onclick.html shubh/javascript/onclick.html
356 Views
0 Comments

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

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>events</title>
javas.js shubh/javascript/javas.js
131 Views
0 Comments
let a=10;
console.log(a);
OTP.css shubh/javascript/OTP.css
161 Views
0 Comments
body {
margin: 0;
padding: 0;
background: linear-gradient(120deg, rgb(10, 10, 208), rgb(246, 3, 3));
background-repeat: no-repeat;
background-size: cover;
height: 100vh;
}
README.md shubh/javascript/README.md
293 Views
0 Comments
# JavaScript
JavaScript small projects....

Object.js shubh/javascript/Object.js
130 Views
0 Comments
//Here the examples of object in JavaScript..
const profile={
username:"Shubh Kulshrestha",
posts:1,
followers:85,
following:157,
};
console.log(profile);
getAttribute.html shubh/javascript/getAttribute.html
311 Views
0 Comments
// getAttribute
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Properties</title>
node.Style.html shubh/javascript/node.Style.html
295 Views
0 Comments
// node.Style
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Properties</title>
Operators.js shubh/javascript/Operators.js
130 Views
0 Comments
// Operators in JavaScript...
// Arithmetic Operator
let a = 10;
let b = 5;
console.log(a + b); // Addition
console.log(a - b); // Subtraction
console.log(a * b); // Multiplication
console.log(a / b); // Division
Loops.js shubh/javascript/Loops.js
125 Views
0 Comments
//Loops in Javascript...
//For loop
for (let i = 1; i <= 5; i++){
console.log("Hello JavaScript..");
}

//Calculate sum of n numbers...
let num = prompt("Enter the number:");
deleteElement.html shubh/javascript/deleteElement.html
332 Views
0 Comments
// delete element
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>delete element</title>
ondblclick.html shubh/javascript/ondblclick.html
321 Views
0 Comments
// ondblclick event using inline event handling
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>events</title>
<style>
setAttribute.html shubh/javascript/setAttribute.html
317 Views
0 Comments
// setAttribute
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Properties</title>
<style>
insertElement.html shubh/javascript/insertElement.html
341 Views
0 Comments
//insert element
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>insert element</title>
eventObject.html shubh/javascript/eventObject.html
307 Views
0 Comments
// Event Object
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>event object</title>
<style>
Events.js shubh/javascript/Events.js
132 Views
0 Comments
//Events in JavaScript...
//Event Handling...
node.event = () =>{
// handle here
};

//Event objects
Node.event = (e) =>{
Array.js shubh/javascript/Array.js
129 Views
0 Comments
// Arrays in JavaScript...
let marks=[23,45,67,43,76];
console.log(marks);
console.log(marks.length);// Arrays length

//Looping over an array...
let marks=[23,45,67,43,76];
for(i=0;i<marks.length;i++){
templateLiterals.js shubh/javascript/templateLiterals.js
130 Views
0 Comments
// Template Literals
let userName=prompt("enter name: ");
let fullName=`@${userName}${userName.length}`;
console.log(fullName);

innerHtml.html shubh/javascript/innerHtml.html
310 Views
0 Comments
<!DOCTYPE html>
<html lang="en">

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

OTP Generator.html shubh/javascript/OTP Generator.html
371 Views
0 Comments
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>OTP Generator</title>
<link rel="stylesheet" href="OTP.css">
</head>
OTP.js shubh/javascript/OTP.js
194 Views
0 Comments
function generateOTP(){
let otp = " ";
let digits = "0123456789";
for(i=0;i<4;i++){
otp += digits [Math.floor(Math.random()*10)];
}
document.getElementById("otpdisplay").innerText=`OTP is ${otp}`;
}
AlertBox.html shubh/javascript/AlertBox.html
340 Views
0 Comments
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alert Box</title>
</head>
<body>
addEventListener.html shubh/javascript/addEventListener.html
340 Views
0 Comments
//eventListener
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>event listener</title>
<style>
Functions.js shubh/javascript/Functions.js
130 Views
0 Comments
// Functions in JavaScript...
function myFunction(){
console.log("Hi JavaScript!");
console.log("I'm Shubham");
}
myFunction();

// using parameters
textContent.html shubh/javascript/textContent.html
326 Views
0 Comments
// DOM Manipulation
// textContent properties

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Conditional Statement.js shubh/javascript/Conditional Statement.js
135 Views
0 Comments
// Conditional Statement...

// if statement
let num = prompt("Enter your age:");
if(num >= 18){
console.log("Eligible for vote");
}

removeEventListener.html shubh/javascript/removeEventListener.html
360 Views
0 Comments
// remove eventlistener
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>event listener</title>
<style>