Member-only story

JavaScript Basics — Part 1

Max N
3 min readNov 22, 2019

--

In this article, we will look into the basics of JavaScript and also look at some parts of JavaScript that you may commonly use, briefly describe them, and show some examples.

Console.log()

The console.log() method is used to log or print messages to the console. Usually, you’ll use this method to print out numbers or strings but you can also use this method to print out objects, functions, and other things.

console.log('Pork') // Output: Pork
console.log(123) // Output: 123

JavaScript Methods

Methods are actions that can be performed on objects and return information about that object. Methods are called by appending a period, method name and parentheses to the object name. JavaScript has a lot of methods from built-in objects. Here are some examples below using the Math object:

Math.random() 
Math.abs()

--

--

Max N
Max N

Written by Max N

A writer that writes about JavaScript and Python to beginners. If you find my articles helpful, feel free to follow.

No responses yet