diff --git a/difftest.ts b/difftest.ts index 1301a0b..478d2a2 100644 --- a/difftest.ts +++ b/difftest.ts @@ -1,13 +1,10 @@ -// This file is meant to test sub-line diffing - // Here I'm going to change the leading whitespace before the args myFunction.doWithArgs( arg1, arg2.getProperty() ); -// Here I'm going to add a third import to see if it handles the commas right -import { foo, bar } from "library"; - // Here I will change the args const result = doSomethingWith(ThingOne, ThingTwo); + +console.log("added line"); diff --git a/fib.js b/fib.js new file mode 100644 index 0000000..82441ef --- /dev/null +++ b/fib.js @@ -0,0 +1,14 @@ +// program to generate fibonacci series up to n terms + +// take input from the user +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; +} diff --git a/index.js b/index.js index 970a04b..4fd8db3 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,6 @@ function main(args) { console.log(args); + console.log("Done"); } main();