Created
December 2, 2015 18:47
-
-
Save anitahall102790/0765a1504b220fd58dde to your computer and use it in GitHub Desktop.
Summary of Javascript Lesson1
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
// I learned about the different data types | |
var myName = "this is a string"; | |
var myNumber = 25; | |
var myBoolean = (false, 5>4) | |
//I learned how to output on the console | |
console.log("myName".length); | |
// I learned how to check the length of strings and manipulate the variables in different ways | |
//Modulo | |
console.log(10 % 8); | |
//substrings | |
console.log("January".substring(0,3)) | |
//I also learned how to declare and change a variable | |
var myName= "Anita"; | |
console.log("myName"); | |
myName= "An"; | |
console.log("myName"); | |
//I also learned if/else statements | |
if ("myName".length =>7) { | |
console.log("You have a long name!"); | |
} | |
else { | |
console.log("You have a short name!"); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment