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.