add variables in javascript
var a = 5;
var b = 2;
var c = a + b;
add variables in javascript
var a = 5;
var b = 2;
var c = a + b;
how to add a variable in js
var x = 5; // assign the value 5 to x
how to add a variable in js
var x = 5; // assign the value 5 to x
how to assign variables in javascript
// 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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us