Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JAVASCRIPT TUTORIAL Simple things to try
- // Declartion let x;
- // Assignment let x = 100;
- let gpa = 2.1,
- let age = 80;
- let price = 10.99;
- console.log(" My gpa is ${gpa}"); // console would say "2.1"
- console.log("The price is: $${price}"); // console would say $10.99
- console.log("My age is ${age}"); // console would say 80
- // displaying the data type of theses would be console.log(typeof age); or gpa, or price and so on. all "number types"
- _
- _
- _
- //Strings
- let firstName = "YOLODanverga";
- let favoriteFood = "pizza";
- console.log("Your name is ${firstName}"); //console will print "Your name is YOLODanverga
- console.log("You like ${favoriteFood}"); // console will print out that you like pizza
- console.log("My email is: ${email}"); // console will print out your email.
- //Booleans
- let online = true;
- //start wil console.log(typeof online); to see the datatype
- conslle.log("YOLODanverga is online: ${online}"); // console YOLLODanvera is online: true; if we made it false, it be the same
- // will add more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement