Advertisement
YOLOdanverga

Untitled

Jun 2nd, 2025 (edited)
705
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 1.13 KB | Source Code | 0 0
  1. JAVASCRIPT TUTORIAL Simple things to try
  2.  
  3. // Declartion  let x;
  4. // Assignment let x = 100;
  5.  
  6.  
  7. let gpa = 2.1,
  8. let age = 80;  
  9. let price = 10.99;
  10.  
  11. console.log(" My gpa is ${gpa}");  // console would say "2.1"
  12. console.log("The price is: $${price}"); // console would say $10.99
  13. console.log("My age is ${age}"); // console would say 80
  14.  
  15. // displaying the data type of theses would be console.log(typeof age); or gpa, or price and so on. all "number types"
  16.  
  17.  
  18.  
  19. _
  20.  _
  21.   _
  22.  
  23.   //Strings
  24.  
  25.   let firstName = "YOLODanverga";
  26.   let favoriteFood = "pizza";
  27.   let email = "[email protected]";
  28.  
  29.   console.log("Your name is ${firstName}"); //console will print "Your name is YOLODanverga
  30.   console.log("You like ${favoriteFood}"); // console will print out that you like pizza
  31.   console.log("My email is: ${email}"); // console will print out your email.
  32.  
  33.  
  34.   //Booleans
  35.  
  36.   let online = true;
  37.  
  38.   //start wil console.log(typeof online); to see the datatype
  39.  
  40.   conslle.log("YOLODanverga is online: ${online}"); // console YOLLODanvera is online: true;  if we made it false, it be the same
  41.  
  42. // will add more
  43.  
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement