Javascript

Home Load Console Selectors CSS Form Strings If Else Array Reg Exp Date & Time setTimeout JSON Loops Objects Animation Fat Arrow Class Import IIFE undefined Tabulator.js ES6 Event Listeners AJAX Hide Elements Create Elements Checkbox ejs
O O

Weather Controls

Time Of Day
Rain
Wind Speed
Wind Direction
Clouds

Javascript : Import

2022-07-18

Import are another thing added by ES6.

I think it imports and exports classes;

import {Heater} from './heater';

export class CoffeeMaker {
  // ...
}

Annotations

This may or may not be included in ES6 future versions.

Current Javascript

var CoffeeMaker = function(...) {
  // ...
}
CoffeeMaker.annotations = [
  new Inject(Grinder, Pump, Heater)
]

Maybe New

@Inject(Grinder, Pump, Heater)
class CoffeeMaker {
  //...
}