10 most usefull javascript basics you should know

JavaScript was first discovered in 1995 by Brendan Eich and was named after Java language. Later on JavaScript was submitted to Ecma International which was published on 2009. Today I will discuss about 10 JavaScript bacics that your should know as a JavaScript developer.

The first thing that comes to our mind is dealing with data types. To talk about data types one developer should have knowledge upon- Number, String, Boolean, Function, Object, Null and undefined. There is also sub-section in Object data type which are Function, Array, Date and RegExp are worth mentionable.

parseFloat('123', 10); //123
parseInt('0`0', 10); //10
Number.isNaN(); //Determined whether the number is NaN

2. The second most important data type is String. Many of us started the programming life by printing “Hello World” -that’s string. There exist numerous build in String functions in JavaScript. Among them-

'hello'.charAt(0); // "h"
'hello'.concat(' world'); // "hello world"
'Hello'.toLowercase; // 'hello'
'hello'.toUppercase; // 'HELLO'

3. There are some beautiful JavaScript build in functions for Math operation. Lets jump into-

Math.ceil(7.004); // returns 8
Math.floor(6.95); // returns 6
Math.round(); // range 0 to 1

4. Suppose you have breads without jams. Will be it convenient? Of course not! Who wants to have a solo bread in his breakfast? JavaScript Array is one that one kind. The importance of Array not only in JavaScript but for all programming languages is immense. Basic of writing Array- const arr = [] Counting stars in the sky is much easy than to master in Array build in functions. Quickly let’s see some of the Array build in functions-

['apple', 'banana'].push('mango'); // ['apple', 'banana', 'mango']
['apple', 'banana', 'mango'].pop('mango'); // ['apple', 'banana']
['apple', 'banana'].length; // 2
['apple', 'banana', 'mango'].shift(); // ['banana', 'mango']
['a', 'b', 'c'].reverse(); // ['c', 'b', 'a']

5. It’s haloween day. You are knocking on someones door. Trick or treat!? As a treat you got a packet of chocolates. You are excited to open the packet. You are shocked by seing whats inside! Its empty ‘null’. You got tricked. By now you got idea what’s null is in a programming language. It means empty value in a variable. Let’s see some examples-

const str = null;
// output: null

6. Besides null there is also a similar type of data type called Undefined. When a variable is declared but not initialized at that time the value is set undefined.

let a;
// output: undefined

A beginners guide to SSL: When you navigate to websites have you ever seen something like http & https? Have you noticed the difference between http & https? Yes your are right the char S. It may seem only a single character or some minor things. But its not. This ‘s’ makes a huge diffence in modern Web applications. To figure this out we have to know what is SSL. SSL stands for ‘Secure Socket Layer’. Websites with hypertext containing https is more secure and encrypted. Next time you visit a site be sure about its security.

That’s enough enough for today folks. See you on some other stories. Good day paul. Happy coding.



Call me Naim your programmer friend who is always looking for solving challenging task and adapt with new technologies.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Naim Morshed

Call me Naim your programmer friend who is always looking for solving challenging task and adapt with new technologies.