var a = 5;
var b = 2;
var c = a + b;
var x = 5; // assign the value 5 to x
// data from json: resp = {"home": 1, "landmark": 2}
// Method 1:
// use ` for add variable
url = `workspace/detail/${resp.home}`;
console.log(url) -> // workspace/detail/1
// Method 2:
// use ' and + for concentrace variable
url = 'workspace/detail/' + resp.home;
console.log(url) -> // workspace/detail/1
//Assigns the value bar to the variable foo
var foo = bar;
// you an pass in strings or a number
var exampleVariable = 'Example string' // this is a normal string
var anotherExample = 839;
//variables are a way to easily store data in javascript
//variables are declared by the var keyword, example...
var x = 10;
//or
var dog_name = "daisy";
//which can also be written as
var dog_name = 'daisy';
//same thing with single quotes and double quotes
var x = 5; // assign the value 5 to x
var myVar; //unitialized variable( can be intiallized later )
var number = 1; //number
var string = " hello world " ; //string
var boolean = true ; //boolean
myVar = function(){ //variable can hold function
};