-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Rename Multiple file and Also add Multiple file - Delete Some Component's inside Stared code
- Loading branch information
1 parent
246ae0a
commit 3adf2a6
Showing
117 changed files
with
22,776 additions
and
60 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/*====================================================================== | ||
Tricky InterView Question | ||
=======================================================================**/ | ||
|
||
|
||
console.log(10 + "20") // 1020 | ||
console.log(9 - "5") // 4 | ||
console.log("Abhishek" + "Gupta") // AbhishekGupta | ||
console.log(" " + " ") | ||
let sum = " " + 0 | ||
console.log(typeof sum) | ||
console.log("Abhishek" - "Gupta") // NaN | ||
// true => 1 | ||
// false => 0 | ||
// 1 + 1 => 2 | ||
console.log(true + true) | ||
console.log(true + false) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
class User { | ||
constructor(username){ | ||
this.username = username | ||
} | ||
|
||
logMe(){ | ||
console.log(`UserName is ${this.username}`) | ||
} | ||
} | ||
|
||
class Teacher extends User{ | ||
constructor(username,email, password){ | ||
super(username) | ||
this.email = email; | ||
this.password = password; | ||
} | ||
|
||
addCourse(){ | ||
console.log(`A new course was added by ${this.username}`) | ||
} | ||
} | ||
|
||
const Chai = new Teacher('Chai', '[email protected]', '123456') | ||
|
||
Chai.addCourse() |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Es6 | ||
|
||
class User { | ||
constructor(name, age) { | ||
this.name = name; | ||
this.age = age; | ||
} | ||
|
||
nameUpperCase(){ | ||
return this.name.toUpperCase(); | ||
} | ||
|
||
|
||
} | ||
|
||
|
||
|
||
const user = new User('Abhishek' , 12) | ||
|
||
console.log(user.nameUpperCase()) | ||
|
||
/************************************************************** | ||
Behind the scene | ||
***********************************************************/ | ||
|
||
|
||
|
||
// // Function constructor for User | ||
// function User(name, age) { | ||
// this.name = name; | ||
// this.age = age; | ||
// } | ||
|
||
// // Adding a method to the User prototype | ||
// User.prototype.nameUpperCase = function() { | ||
// return this.name.toUpperCase(); | ||
// } | ||
|
||
// // Creating an instance of User using the `new` keyword | ||
// const user = new User('ram', 15); | ||
|
||
// // Calling the `nameUpperCase` method on the `user` instance | ||
// console.log(user.nameUpperCase()); // Outputs: AB | ||
|
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
23 changes: 23 additions & 0 deletions
23
React/09_Day_JSX_with_curly_braces/Starter_Code/src/App.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.card{ | ||
padding: 35px 35px; | ||
width: 25vw; | ||
border-radius: 65px; | ||
margin-top: 5vh; | ||
margin-left: 8vw; | ||
display: flex; | ||
flex-direction: column; | ||
height: 50vh; | ||
background-color: #000000; | ||
color: white; | ||
} | ||
|
||
|
||
.card img{ | ||
height: 45%; | ||
width: 100%; | ||
} | ||
|
||
|
||
.card h1{ | ||
font-size: 2rem; | ||
} |
30 changes: 30 additions & 0 deletions
30
React/09_Day_JSX_with_curly_braces/Starter_Code/src/App.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
// In JSX, you can write plain HTML-like syntax, but if you need to include JavaScript expressions (like variables, functions, or calculations), you must wrap them in curly braces {}. | ||
|
||
// JSX mein curly braces {} ka use karna kaafi zaroori hota hai jab humein dynamic values ya expressions render karni hoti hain. Jaise tumhare code mein {avatar} se image ka URL aur {description} se naam display ho raha hai. Tum conditional logic, arrays, objects, ya functions ko bhi curly braces mein pass kar sakte ho. Yeh React mein dynamic content ko efficiently manage karne ka tareeka hai. | ||
|
||
import './App.css' | ||
|
||
|
||
function App() { | ||
|
||
const avatar = 'https://i.imgur.com/7vQD0fPs.jpg'; // Declaring a JavaScript variable | ||
const description = 'Gregorio Y. Zara'; // Another JavaScript variable | ||
|
||
// You can Write your Js code inside html using Curly Braces | ||
return ( | ||
<> | ||
<div className="card"> | ||
{/* The image source is injected via curly braces */} | ||
<img src={avatar} /> | ||
{/* The description text is injected using curly braces */} | ||
<h1> | ||
{description} | ||
</h1> | ||
</div> | ||
{/* {this.state.userName} */} | ||
</> | ||
) | ||
} | ||
|
||
export default App |
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.