JavaScript program to print the first n terms of the Fibonacci sequence:
let n = 10;
let first = 0;
let second = 1;
console.log(first);
console.log(second);
for (let i = 2; i < n; i++) {
let next = first + second;
console.log(next);
first = second;
second = next;
}