JavaScript - The Basics
Learning to code and programming takes time, if someone says coding is easy, you have to rethink it, but all of this is doable, it just takes time.
After a long hiatus and leaving writing syntax and understanding coding logic, now I have to go back to learning from scratch the basics of JavaScript.
I did all this as one of the requirements to get a scholarship to study Back-End Developer which will be taught by Dicoding in September, there are three courses requirements that I must pass, one of which is basic JavaScript.
Many things I re-learned about JavaScript such as a basic introduction to JavaScript, its history and also writing code in JavaScript.
console.log("Hello, World!");
I'm sure everyone has done the same thing when they first learned to code.
Comments
Then I learned about writing comments, both one-line comments and comments in the form of explanatory sentences
// This is a one-line comment, the code below will not run
// console.log("Halo!");
This comment will not be read by the interpreter, another example of writing a comment is as follows;
/* This is a comment with more than one line
Any text that is here will be used as a comment.
*/
I also do the task of calculating if logic to evaluate the score value;
function scoreChecker(score) {
let result;
// TODO
if(score>=90){
result = 'Selamat! Anda mendapatkan nilai A.';
}
else if(score>=80 && score<=89){
result = 'Anda mendapatkan nilai B.';
}
else if(score>=70 && score<=79){
result = 'Anda mendapatkan nilai C.';
}
else if(score>=60 && score<=69){
result = 'Anda mendapatkan nilai D.';
}
else{
result = 'Anda mendapatkan nilai E.';
}
// Do not delete this
return result;
}
console.log(scoreChecker(90));
/**
* Don't delete the code below
*/
module.exports = scoreChecker;
And many more to learn
There are many other basic things that I learned during this course, ranging from Variables, Data types, Operators, Conditional statements, Switch case statements, and loops.
At the end of each section, each participant is provided with a quiz to test the extent of our understanding of the material that has been taught.
Finally, Knowledge Check
This is the most challenging part, the exam with a set time, which is five minutes to answer 3 questions with a 100% passing score.
I had to take nine tests to qualify 100%, I failed from the first try to the eighth try, the new ninth attempt I succeeded and passed.
The next material is Data Structures, I will share my experience with learning Data Structures in my next post.
Leave JavaScript - The Basics to:
Read more #programming posts
Best Posts From Iqbal Adan
We have not curated any of iqbaladan's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Iqbal Adan
- Look Inside Yourself And Contemplate!!!
- About Gaming and Regaining Focus
- JavaScript - Learning About Objects
- JavaScript - The Basics
- Is Blockchain Really Safe From Hacking?
- Splintertalk - Cleanse Ability That Prevent You From Being Poisoned
- End of Season Review And Lessons Learned
- My Experience Buying CUB and The Problems I Got
- How Airdrops Affect The Launching of A Product.
- My End of Season Report on Splinterlands
- Splinterlands - Reaching Gold league for the first time, End of season Rewards, what I have done and will do next season.
- Sense of progress
- My thoughts on Chaos Lagion Pack and Some Notes About It
- My Hardest Season in Splinterlands
- Some Fragments Of Life
- Get Back Your Long Stolen Focus
- It's Not About Who First To Start This Way, But Who Remains Consistent
- My Favorite Types of Coffee
- Trying Linux Mint For The First Time
- The Sea Is The Right Place To Throw Away All Your Complaints And Tiredness