Thursday, December 14, 2023

Day 8 || Introduction of JavaScript || Variable || Data types || Operators

JavaScript Topics  

Day 8 :

  •      Introduction
  •     Variable
  •     Data Types
  •     Operators

Variable :











var bag = 'Hello world';
console.log(bag)

Data Types:











var name = "Mahesh";
var age = 25;
var isMarried = false;
var love = null;
var address;
console.log(name)
console.log(age)
console.log(isMarried)
console.log(love)
console.log(address)

Operators:













// Product: iPhone
// var iPhonePrice = 150000;
// var discountPercentage = 25;
// var discountAmount =(iPhonePrice * discountPercentage)/100;
// console.log("Discount Amount: " + discountAmount + " Rupees");
var a = 5;
var b = 6;
// console.log(a == b);
// console.log(a === b);
// console.log(a != b)
// console.log(a < b)
console.log(a > b);

Task:














Interview Questions:

1. What is the difference between null and undefined in JavaScript?
2. What is the significance of the typeof operator?
3. Explain the difference between == and === in JavaScript?

No comments:

Post a Comment

Top 10 | JavaScript Coding Interview Question | Beginner Level

               JavaScript Coding Interview  Q. No. 01/10:  console . log ( "1" + "4" + "1" ) // 141 console . ...