ejs
ECMASCRIPT TO COMMON JAVASCRIPT
Input :-
- import react from "fs";
- import {FormGroup, FormControl, InputGroup, Glyphicon } from "react-bootstrap";
Output :-
- const react = require("fs").default;
- const { FormGroup, FormControl, InputGroup, Glyphicon } = require("react-bootstrap");
Input :-
- import { resolve as resolvePath } from "path";
Output :-
- const { resolve: resolvePath } = require("path");
Input :-
- 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; }
Output :-
- 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 }
Input :-
- export function Square(x){ Return x*x; }
Output :-
1.function Square(x) { return x*x }
module.exports = { Fibonacci, Square }