Rajeev G. Blog

Javascript Basics Part 1

Last updated:

TechJavascript

Cool console methods

console.table({a:1, b:1})
console.error("Something went wrong")
console.warn("Something went loopy")

console.time("timer");
console.table({a:1, b:1})
console.error("Something went wrong")
console.warn("Something went loopy")
console.timeEnd("timer");

var,let,const

//initiate var without empty string
var something;

//initiate let and assign value '5'
let val;
val = 5;

//initiate a 'constant' (unchangeable) variable
const unchangeable = "unchangeable";

//intiate a constant object
const person = {
name: "jeev",
age: "22"
}