JavaScript - The Basics

avatar
(Edited)

js-basic.png

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.

testing.png

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.



0
0
0.000
12 comments
avatar

That is awesome, I am also in the process of learning javascript, more specific for front end coding! Nice beginnings that you brought
!1UP

0
0
0.000
avatar

Thanks for stopping by, @gwajnberg, nice to hear you're also learning JavaScript, I'm also interested in the front end, but I feel that I'm lacking in design, so I decided to try the back end, and hopefully I can finish this course and build projects with it.

0
0
0.000
avatar
Don-1UP-Cheers-Cartel-250px.png

You have received a 1UP from @gwajnberg!

The following @oneup-cartel family members will soon upvote your post:
@stem-curator, @vyb-curator, @pob-curator, @pal-curator
And they will bring !PIZZA 🍕

Learn more about our delegation service to earn daily rewards. Join the family on Discord.

0
0
0.000
avatar

Hopefully you'll get that one! I've heard of dicoding and I guess I checked them out once in the past. But, How much does the scholarship worth? is it online course or do they have an offline classes too? I am probably trying with Le Wagon either this or next year since they also have the offline school and impressed with their learning system.

0
0
0.000
avatar

Hopefully you'll get that one!

Hopefully, @macchiata.

I've heard of dicoding and I guess I checked them out once in the past. But, How much does the scholarship worth? is it an online course or do they have offline classes too?

As far as I know, these is only online-based courses, this is also part of the Dicoding program in collaboration with Indosat and IDcamp, I got a coupon to study three classes before moving on to the Back-end developer section which will be held in September, hopefully, I can catch up and finish on time.

I am probably trying with Le Wagon either this or next year since they also have an offline school and are impressed with their learning system.

I just found out that Le Wagon has offline classes, long ago when I was looking for HTML tutorials, I've watched the Le Wagon Bootcamp, it seems from France, and from what I read from your comment above that Le Wagon has offline classes, I did a little research, and it turns out that they have an offline Bootcamp too, right? And Bali is a good place and the right choice.

I hope you can finish the Bootcamp.

0
0
0.000
avatar

Iqbal, may I ask about the cover picture - is it you made the capture?

0
0
0.000
avatar

Yes, I made it using canva with free image from unsplash.

0
0
0.000