JavaScript Crash Course For Beginners

WHAT IS JAVASCRIPT

  • High-level, interpreted programming language.

  • Conforms to the ECMAScript specification

  • Multi-paradigm

  • Runs on the client/browser as well as on the server (Node.js)

WHY LEARN JAVASCRIPT

  • It is the programming language of the browser.

  • Build very interactive user interfaces with frameworks like React

  • Using in building very fast server-side and full stack application

  • Used in mobile development (React Native, NativeScript, Ionic)

  • Used in desktop application development (Electron JS)

WHAT YOU WILL LEARN IN THIS COURSE

  • Variables and Data Types

  • Arrays

  • Object Literals

  • Methods for strings, arrays, objects, etc

  • Loops - for while, for…of, forEach, map

  • Conditionals (if, ternary & switch)

  • Functions (normal & arrow)

  • OOPS (prototypes & classes

  • DOM Selection

  • DOM manipulation

  • Events

  • Basic Form Validation

Variables and Data Types

Console

console.log("This is console log");
console.error("This is use for console
console.warn("Warning Message");

Variable

var
let
const

var
var score = 20; var score = 30; console.log(score);
let
let score = 20; 
score = 30;
console.log(score);
const
const score = 20; 
console.log(score);

Data Types

String
Number
Boolean
null
undefined

String
const name = "Jhon";
Number
const age = 21;
const rating = 4.5;
Boolean
const x = true;
Undefined
const y = undefined;
let z;

JavaScript Variable Print

const name = "Jhon";
const age = 21;

console.log("My name is", name, "and I am", age, " 
years old");

Concatenation

const name = "Jhon";
const age = 21;

console.log("My name is " + name + " and I am " + age + " years old");

Template String

const name = "Jhon";
const age = 21;

console.log(`Hello, My name is ${name} and I'm ${age} years old`);

Type of JavaScript

const name = "Jhon";
const age = 21;
const rating = 4.5;
const x = true;
const y = undefined;
const z;

console.log(typeof name); 
console.log(typeof age); 
console.log(typeof rating); 
console.log(typeof x); 
console.log(typeof y); 
console.log(typeof z);
Substring
let name = "Mahbubul Alam";
console.log(name.substring(0, 5));
Uppercase
let name = "Mahbubul Alam";
console.log(name.toUpperCase());
Lowercase
let name = "Mahbubul Alam";
console.log(name.toLowerCase())
Split
let name = 'Mahbubul, Sakib, Nakib, Abdullah'
console.log(name.split(', '))

Did you find this article valuable?

Support promahbubul by becoming a sponsor. Any amount is appreciated!