Final answer:
To display the number sequence from 100 to 150 in different formats in event-driven JavaScript, you can use loops and conditional statements to concatenate the numbers with the desired symbols.
Step-by-step explanation:
To display the number sequence from 100 to 150 in different formats using event-driven JavaScript, you can use loops and conditional statements. Here are examples of each format:
a) Using a comma:
let sequence = '';
for (let i = 100; i <= 150; i++) {
sequence += i + ', ';
}
console.log(sequence);
b) Using a hyphen:
let sequence = '';
for (let i = 100; i <= 150; i++) {
sequence += i + ' - ';
}
console.log(sequence);