Writing my first "Hello world" was scary and at the same time very exciting. It was scary because it was my first time giving a computer a command and I was not sure if it was going to obey. I felt so excited when it obeyed and I gained confidence to manipulate it to do more.
In a month, I have been able to learn html,css and Javascipt which is basically front end development.I'm so proud of myself because I have been able to apply this knowledge in two projects. I made a portfolio using html and styled it using css and recently I made a Budget expense tracker using html, styled it using css and used javascript to provide interactivity.
I love styling and designing so so far css has been my best interaction.I haven't fully mastered javascript, but I'm sharpening my skills by watching youtube tutorials and doing daily practices.
In my budget expense tracker project, I got to interact with a new concept of APIs.At first, it was hard to understand and implement but, later I got so amazed by how APIs works.API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. APIs allow us to add important data and functionality to the applications we build. You can think of an API as one way in which data is exposed to us developers for use in our own programs.Each time you use an app like Facebook, send an instant message, or check the weather on your phone, you’re using an API.
In my project I used the currency converter API.This API has data of all currencies in the world. I implemented this API in my project to help in converting the income,expense and balance values from euros to all other currencies in the world.
Below is a guide on how I went about fetching data from my API and how I manipulated it to convert the income, expence and balance values to various currencies in the world:
fetch("https://api.currconv.com/api/v7/currencies?&apiKey=0243a45e9b454a58911028adbd33c090")
. then(res => res. json())
. then((out) => {
console.log(typeof out.results);
const currencies = out.results;
for (element in currencies){
var opt = document.createElement("option");
opt.value= currencies[element].id;
opt.innerHTML = currencies[element].currencyName;
const newSelect =document.getElementById("currency");
newSelect.appendChild(opt);
}
})
. catch(err => { throw err });
function changeCurrency(){
const id = document.getElementById("currency").value;
fetch(`https://api.currconv.com/api/v7/convert?q=USD_${id}&compact=ultra&apiKey=0243a45e9b454a58911028adbd33c090`)
.then(response => response.json())
.then(data =>{
for(con in data){
console.log(data[con]);
const balanceValue = balance.innerHTML;
const newValue = balanceValue * data[con];
balance.innerHTML = newValue;
const incomeValue = money_plus.innerHTML;
const newIncome = incomeValue * data[con];
money_plus.innerHTML = newIncome;
const expenseValue = money_minus.innerHTML;
const newExpense = expenseValue * data[con];
money_minus.innerHTML = newExpense;
}
})
}
I must say it has not been a walk in the park. Day by day things get harder but, I have had to get tougher and more disciplined for me to manage all the pressure that comes with coding.Despite all the ups and downs coding has given me the best experience, exposed me to challenges that have made me stronger,smarter and sharper.It's a journey I don't regret starting and encourage people to venture into it.
Top comments (2)
Hey, that's better than a lot of developers I know. If you keep going at the same rate you'll be a great dev.
I might use this opportunity to give you a couple of advices I wish younger me knew:
Best wishes throughout your learning journey.
Thank you so much, so much encouraged.