ECMASCRIPT TO COMMON JAVASCRIPT
- import react from "fs";
- import {FormGroup, FormControl, InputGroup, Glyphicon } from "react-bootstrap";
- const react = require("fs").default;
- const { FormGroup, FormControl, InputGroup, Glyphicon } = require("react-bootstrap");
- import { resolve as resolvePath } from "path";
- const { resolve: resolvePath } = require("path");
- export function Fibonacci() { const number = parseInt(prompt('Enter the number of terms: ')); let n1 = 0, n2 = 1, nextTerm;
console.log('Fibonacci Series:');
for (let i = 1; i <= number; i++) { console.log(n1); nextTerm = n1 + n2; n1 = n2; n2 = nextTerm; }
- function Fibonacci() { const number = parseInt(prompt('Enter the number of terms: ')); let n1 = 0, n2 = 1, nextTerm;
console.log('Fibonacci Series:');
for (let i = 1; i <= number; i++) { console.log(n1); nextTerm = n1 + n2; n1 = n2; n2 = nextTerm; }
module.exports = { Fibonacci }
- export function Square(x){ Return x*x; }
1.function Square(x) { return x*x }
module.exports = { Fibonacci, Square }