1//choose the best for your solution
2var myVariable = 22; //this can be a string or number. var is globally defined
3
4let myVariable = 22; //this can be a string or number. let is block scoped
5
6const myVariable = 22; //this can be a string or number. const is block scoped and
1// data from json: resp = {"home": 1, "landmark": 2}
2// Method 1:
3// use ` for add variable
4url = `workspace/detail/${resp.home}`;
5console.log(url) -> // workspace/detail/1
6
7// Method 2:
8// use ' and + for concentrace variable
9url = 'workspace/detail/' + resp.home;
10console.log(url) -> // workspace/detail/1
11