Skip to content

Latest commit

 

History

History
22 lines (21 loc) · 482 Bytes

File metadata and controls

22 lines (21 loc) · 482 Bytes

Variable declaration

let x = 1
const y = 1
var z = 1

Conditional

let x = 1
if(x==1){
  console.log("Hello")
}
else{
  console.log("Bye")
}

Assignments

  • Differnce between let and var
  • Differnce between let and const
  • Imagine you're building an e-commerce website. How would you use JavaScript variables to store and manipulate the price of a product in a shopping cart?
  • Show user login mechanism of social media using if else statements and variables