Member-only story
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()