Salary ranges between 3.5lpa to 35lpa which we refer for as a fresher π we support you to push the max LPA
hey join me on Discord! Invite expires in 7 days. https://discord.gg/wmEUmpCX
Discord
Join the TEAMJAVAHYD Discord Server!
Check out the TEAMJAVAHYD community on Discord - hang out with 1 other members and enjoy free voice and text chat.
Java Hyd Team pinned Β«hey join me on Discord! Invite expires in 7 days. https://discord.gg/wmEUmpCXΒ»
Hello World here are 3 Javascript cheat sheet tips that all junior developers should know. These are very important to remember and will help you become a better developer.
) Array Methods
Map β Filter β Reverse;
Map allows you to take an array and create a function to change each individual object in a certain array.
Ex.) [1, 2, 3] .map (x => x *2) // [2, 4, 6];
Filter allows you to sort through the array and return all objects which follow the set of rules stated into a new array.
Ex.) [7, 12, 23].filter(x => x < 11) // [7];
Reverse allows you to rearrange the array from the back to the front.
Ex.) [6, 9, 18].reverse() // [18, 9, 6]
2.) Ternary Operator
The ternary operator is sort of like an if statement, however the syntax is different. The ternary operator will check if a statement is true, and if so it will render the first statement. Else it will render the next statement.
Syntax β statement === true ? render this : else render this
Ex.) var light = true;
light === true ? <h1>Light is on </h1> : <p> Light is off </p>
// LIGHT IS ON
Think of the β?β as an if. If light is true , then render an h1. Else ( think of the β:β as else) render the p.
3.) Arrow Functions
Arrow functions allow you to remove many elements from the traditional function syntax and really clean up your code to make it less cluttered.
Traditional function:
function multiplyItems (x) {
x * 2
return x;
}
Arrow Function : (x) => x *2
Arrow functions allow you to remove the word βfunctionβ and the function name. You can also remove the parentheses from the input, however sometimes it is helpful to keep it as it makes reading the code easier.
) Array Methods
Map β Filter β Reverse;
Map allows you to take an array and create a function to change each individual object in a certain array.
Ex.) [1, 2, 3] .map (x => x *2) // [2, 4, 6];
Filter allows you to sort through the array and return all objects which follow the set of rules stated into a new array.
Ex.) [7, 12, 23].filter(x => x < 11) // [7];
Reverse allows you to rearrange the array from the back to the front.
Ex.) [6, 9, 18].reverse() // [18, 9, 6]
2.) Ternary Operator
The ternary operator is sort of like an if statement, however the syntax is different. The ternary operator will check if a statement is true, and if so it will render the first statement. Else it will render the next statement.
Syntax β statement === true ? render this : else render this
Ex.) var light = true;
light === true ? <h1>Light is on </h1> : <p> Light is off </p>
// LIGHT IS ON
Think of the β?β as an if. If light is true , then render an h1. Else ( think of the β:β as else) render the p.
3.) Arrow Functions
Arrow functions allow you to remove many elements from the traditional function syntax and really clean up your code to make it less cluttered.
Traditional function:
function multiplyItems (x) {
x * 2
return x;
}
Arrow Function : (x) => x *2
Arrow functions allow you to remove the word βfunctionβ and the function name. You can also remove the parentheses from the input, however sometimes it is helpful to keep it as it makes reading the code easier.
import { useState} from "react";
import "./Comp1.css";
const Comp1 =()=>{
const [str] = useState(`Hello`);
const [num] =useState(100);
const [bool] = useState(true);
const [obj]= useState({"key1":"hello_1....","key2":"hello_2...","key3":"hello_3.."});
const[arr] = useState([10,20,30,40,50]);
return(
<>
<h1>{str}</h1>
<h1 className="class-one">{num}</h1>
<h1 id="id-one">{JSON.stringify(bool)}</h1>
<h1>{obj.key1}{obj.key2}{obj.key3}</h1>
{arr.map((Element,index)=>{
return(
<h1 key={index}>{Element}....{index}</h1>
)
})
}
</>
)
}
export default Comp1;
import "./Comp1.css";
const Comp1 =()=>{
const [str] = useState(`Hello`);
const [num] =useState(100);
const [bool] = useState(true);
const [obj]= useState({"key1":"hello_1....","key2":"hello_2...","key3":"hello_3.."});
const[arr] = useState([10,20,30,40,50]);
return(
<>
<h1>{str}</h1>
<h1 className="class-one">{num}</h1>
<h1 id="id-one">{JSON.stringify(bool)}</h1>
<h1>{obj.key1}{obj.key2}{obj.key3}</h1>
{arr.map((Element,index)=>{
return(
<h1 key={index}>{Element}....{index}</h1>
)
})
}
</>
)
}
export default Comp1;
π1