Help writing these Javascript codes?

Write a defining table and a program to print the five times table from 1 to 12 in this format:

5 x 1 = 5
5 x 2 = 10
…

Write a defining table and a program to print all powers of 2 from 20 up to 231, inclusive. In other words, your program should output this series: 1, 2, 4, 8, …, 2147483648

For 5 Table

for(var i=1;i<=12;i++)
{
console.log(`5*${i}=${5*i}`);
}

akki–The whole code please

@Dude1 you need to print them in li tags??? Or just in console???

No offence, but this is supposed to be fairly basic JS.
You are supposed to learn how to perform this tasks.

So instead of asking someone else’s code, or ask to someone else to do your homework for you, why don’t you explain what is the part that confuses you?

What code have you tried so far?
Where is failing?

So that you’ll learn to perform this tasks yourself :wink:

@Dude1

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too. Some of what you are asking is pretty trivial in the Free Code Camp context, so you might find that if you’re not getting the instruction and material you need in your current studies, the FCC curriculum will really help you get started. At a modest guess I’d say investing a 4-5 hours working through the curriculum here will really pay off. You can find the curriculum at https://freecodecamp.org.

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

@akki Start with Html 5 and then put the JS code inside it, closing with html.