Professional Documents
Culture Documents
#######Block of Variables:#######
#######Block of Variables:#######
#######Parameters :#######
#######Parameters :#######
#######Destructuring Content######
module.exports = {states}
#######Destructuring Content######
#######Arrow Function##############
Write an arrow function which takes your name as input and prints "Hello
your_name" to console.
#######Arrow Function##############
#######Template Literals###########
let a = 1; let b = 2;
Achieve the following output using template literals.
"The sum of 1 and 2 is 3"
#######Template Literals###########
#############Class#################
This study source was downloaded by 100000844313934 from CourseHero.com on 03-28-2022 01:05:57 GMT -05:00
https://www.coursehero.com/file/75470599/ECMAScript6-handsontxt/
class Car{
constructor(name, distance){
this.name = name;
this.distance = distance;
}
carDistance() {
return (this.name +' had travelled for ' +this.distance+' miles')
}
}
let Car1 = new Car('Audi', 100);
const msg = Car1.carDistance();
module.exports = {msg}
#############Class#################
############Symbols################
############Symbols################
This study source was downloaded by 100000844313934 from CourseHero.com on 03-28-2022 01:05:57 GMT -05:00
https://www.coursehero.com/file/75470599/ECMAScript6-handsontxt/
Powered by TCPDF (www.tcpdf.org)