This commit is contained in:
27
05_react/uebungen/u02-03_mathfn-modul/assets/js/main.js
Normal file
27
05_react/uebungen/u02-03_mathfn-modul/assets/js/main.js
Normal file
@@ -0,0 +1,27 @@
|
||||
import { add, subtract, divide, multiply } from './math';
|
||||
|
||||
import math from './math';
|
||||
|
||||
import MathFn from './MathFn';
|
||||
|
||||
const app = MathFn();
|
||||
|
||||
console.log(app.add(1, 2)); // => 3;
|
||||
console.log(app.subtract(3, 2)); //=> 1
|
||||
|
||||
console.log(app.multiply(2, 3)); // => 6
|
||||
console.log(app.divide(6, 3)); // => 2
|
||||
|
||||
console.log(add(1, 2)); // => 3;
|
||||
console.log(subtract(3, 2)); //=> 1
|
||||
|
||||
console.log(multiply(2, 3)); // => 6
|
||||
console.log(divide(6, 3)); // => 2
|
||||
|
||||
// -----------------------
|
||||
|
||||
console.log(math.add(1, 2)); // => 3;
|
||||
console.log(math.subtract(3, 2)); //=> 1
|
||||
|
||||
console.log(math.multiply(2, 3)); // => 6
|
||||
console.log(math.divide(6, 3)); // => 2
|
||||
Reference in New Issue
Block a user