Let's learn Javascript together! (level 1)

in #programming7 years ago (edited)


Hi everyone, let me introduce my self, my name is Alex, I am studying Javascript right now, and I decided to share my homework with you, maybe you are at the beginning too or you just want to practice, so hope it will help you too.

I will post condition, and a photo of how the result should look like, below that will be the working code so if you will have trouble and want to look how to do it, you will see the result there. 

The practice is very important, of course theory is important too but without regular practice you will start to forget what you studied. Practicing daily with new challenges will help you a lot in your future maybe bigger projects.

So let's begin, good luck!

Level 1, exercice nr 1 - Show temperature-termometer:

In this exercise should be used the  "getElementById" method, attributes ".style" and ".value".

The following files are given:

termometer.html


termometer.js

//What you have to do:
    // * Find "temperature-input"
    // * Find the div "termometer-indicator"
    // * To read input temperature value
    // * To check if value is between -20..+50 degrees C
    // * To assign the .style.height property to the thermometer indicator so that each degree increases the width by 3px


The result should look like this:

In the comments below you can find my method how I resolve it. Write your method too.


Sort:  

script>

var thealexandru ="Good dear keep it up";
alert(thealexandru );

/scrip>

So my method:
Image of Yaktocat

Congratulations @thealexandru! You have received a personal award!

2 Years on Steemit
Click on the badge to view your Board of Honor.

Do not miss the last post from @steemitboard:
SteemitBoard World Cup Contest - Play-off for third result


Participate in the SteemitBoard World Cup Contest!
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: @good-karma and @lukestokes


Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.028
BTC 57630.83
ETH 3105.65
USDT 1.00
SBD 2.33