I learned how many seconds old am I with the help of variables in JavaScript

avatar

Today I learned about the concept of variables in JavaScript. They are used to define various values. Did various assignments with calculating how many candies will the siblings have to bring to the birthday party. Also created some variables using math. The most interesting part was to find out how many seconds there are in a year and consequently how many seconds old am I! Apparently 1356048000... More then 1.3 billion seconds. Wow!

Made some errors, forgot to add a semicolon sign to some of the lines of code and didn't know how to go back and edit it. Suggestions?

image.pngimage.png
image.png



0
0
0.000
5 comments
avatar

Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!

0
0
0.000
avatar

You are using a JavaScript Console. It is running every line after you hit the ENTER key. There is no way to go back. I suggest you to use the UP and BOTTOM arrow keys on your keyboard which could allow you to move through your history of lines.

Posted using Partiko Android

0
0
0.000