Day-4 of 15 of JS challenges✅
Learnings:
✅Use of Arithmetic Operators (/, %, & **)
✅Math, Number, parseInt, parseFloat, Nan, & toFixed()
✅Calculation with decimal numbers
✅Rounding methods like :- round, floor, ceil, trunc etc.
@ChaiCodeHQ
Day-3 of 15 of JS lab ✅
Learning: Data types, Shallow & Deep copy of object
✅Primitive - store value & Object - store reference
✅Shallow - Copy props. at 1st level
✅Deep - Copy nested props. as well
✅structuredclone() - deep copy
@ChaiCodeHQ
Day-2 done of 15 ✅
Learning:
✅Block scope : Code between { and }, const & let declared inside it, exists only inside it. var ignores it.
✅Hoisting: Before a scope runs, JS reads it & sets up every variable declared in it.
✅TDZ
@ChaiCodeHQ
📌Practice conditionals by solving GitHub classroom assignment's problems.
📌Reinforce learning by practice concepts like if...else, switch, short-circuiting etc.
@ChaiCodeHQ@Hiteshdotcom@nirudhuuu#javascript#coding
💡 Rule of thumb:
📌Use . for known, normal property names.
📌Use [] when the key is dynamic or contains spaces/special characters.
Which one do you use more often: . or []? 👇
#javascript#webdevelopment#coding#100daysofcode
📌JavaScript objects look simple… until you need to access their properties. 🧠
📌An object groups related data using key-value pairs:
const person = {
name: "Alice",
age: 30,
city: "New York"
};
@ChaiCodeHQ@Hiteshdotcom@nirudhuuu
Thread 🧵
But how do you get the values? 👇
1️⃣ Dot notation
https://t.co/k8k5LxUuL5; // Alice
person.age; // 30
2️⃣ Bracket notation
person["name"]; // Alice
const key = "city";
person[key]; // New York
#coding#webdevelopment
Thread 🧵
📌Quick rule to remember:
📌indexOf() → 📍 Where is it?
📌includes() → ✅ Does it exist?
📌Both searches are case-sensitive.
📌Which JavaScript string method confused you the most when you started? 👇
#coding#programming#100daysofcode
📌Most JavaScript beginners use strings every day, but barely understand them. 👀
📌Learn more:👉️ https://t.co/wbHeyGtytV
📌A string is simply a sequence of characters used to represent text.
@ChaiCodeHQ@Hiteshdotcom@nirudhuuu#javascript Thread 🧵
📌But there’s more to strings than "Hello World":
🔹 Strings are immutable
🔹 .length tells you the number of UTF-16 code units
🔹 Characters use zero-based indexing
🔹 indexOf() tells you where a substring appears
🔹 includes() tells you whether it exists