Is it possible to define multiple variables within the same statement? ======================================================================= yes // defining of multiple variables within the same statement a = 30,b = 20,c = 10; var p = 11,q = 22,r = 33; let x = 1,y = 2,z = 3; console.log(a,b,c); console.log(p,q,r); console.log(x,y,z); ========================================== Do we re-assign the value for variable with var? ================================================ Yes If the variable is with var: 1) Re-definition/Re-initialization 2) Re-assignment var a = 123; // initialization console.log(a); a = 112; // initialization// re-assignment console.log(a); var a = 100; // re-definition/Re-initialization console.log(a); ======================================= Is it possible to re-define let and const variables? ===================================================== no. let: ==== 1) initialization 2) re-assignment 3) re-definition ==> not possible let a = 121; console.log(a); a = 222; console.log(a); // let a = 333; const: ====== 1) re-assignment and 2) re-definition ==> not possible const a = 123; console.log(a); // a = 234; // const a = 1122; // console.log(a); ======================================== Conditional Operator: ===================== ?: ==> ternary operator Syntax: resultant = (test_expression/test_condition) ? expression_1 : expression_2; // WAP IN JAVASCRIPT TO CHECK WHETHER THE NUMBER IS POSITIVE OR NEGATIVE. /* n > 0 ==> Positive n < 0 ==> Negative */ var n = 112; result = (n > 0) ? "It is positive number" : "It is negative number"; console.log(result); ================================================ // WAP IN JS TO CHECK WHETHER THE GIVEN NUMBER IS EVEN OR ODD USING CONDITIONAL OPERATOR. /* n dividing with 2 by return '0' as remainder ==> even n dividing with 2 by returning '1' as remainder ==> odd */ n = 135; let result = (n % 2 == 0) ? "It is an Even number." : "It is an Odd number."; console.log(result); ============================================ Assignment: ========== 1) WAP IN JS TO FIND THE BIGGEST NUMBER AMONG TWO NUMBERS USING CONDITIONAL OPERATOR. ===================================== typeof() ======== ==> used to get the type of value. Syntax: typeof(variable) var a = 121; var b = 1.21; var c = 'string'; var d = 'c'; console.log(typeof(a)); console.log(typeof(b)); console.log(typeof(c)); console.log(typeof(d));