Wednesday October 21

Daily JS

String Concatenation & ES6 Strings

var x = 2;
var y = 3;
var z = 'hello';
var a = 'world';
var b = '2';
var c = `${a} ${b}`;

console.log(x + y);
console.log(z + a);
console.log(z + ' ' + a);
console.log(c);
console.log(x + z);
console.log(x + b);

/* Results (Printed statements from console.logs) */
// 5
// "helloworld"
// "hello world"
// "world 2"
// "2hello"
// "22"

Topics

Exercise & Lesson Code

https://github.com/TIY-LR-FEE-2015-Fall/lesson-01-03

Lab

Homework

https://github.com/TIY-LR-FEE-2015-Fall/assignments/tree/master/04-timeline

Resources