TGViewer
Coding Projects Coding Projects @programming_experts ยท 68K subscribers
Post #2475 4.08K
โœ… JavaScript Basics for Web Development ๐ŸŒ๐Ÿ’ป

1๏ธโƒฃ Variables โ€“ Storing Data
JavaScript uses let, const, and var to declare variables.

let name = "John";       // can change later
const age = 25; // constant, can't be changed
var city = "Delhi"; // older syntax, avoid using it

โ–ถ๏ธ Tip: Use let for variables that may change and const for fixed values.

2๏ธโƒฃ Functions โ€“ Reusable Blocks of Code

function greet(user) {
return "Hello " + user;
}

console.log(greet("Alice")); // Output: Hello Alice

โ–ถ๏ธ Use functions to avoid repeating the same code.

3๏ธโƒฃ Arrays โ€“ Lists of Values

let fruits = ["apple", "banana", "mango"];

console.log(fruits[0]); // Output: apple
console.log(fruits.length); // Output: 3

โ–ถ๏ธ Arrays are used to store multiple items in one variable.

4๏ธโƒฃ Loops โ€“ Repeating Code

for (let i = 0; i < 3; i++) {
console.log("Hello");
}

let colors = ["red", "green", "blue"];
for (let color of colors) {
console.log(color);
}

โ–ถ๏ธ Loops help you run the same code multiple times.

5๏ธโƒฃ Conditions โ€“ Making Decisions

let score = 85;

if (score >= 90) {
console.log("Excellent");
} else if (score >= 70) {
console.log("Good");
} else {
console.log("Needs Improvement");
}

โ–ถ๏ธ Use if, else if, and else to control flow based on logic.

๐ŸŽฏ Practice Tasks:
โ€ข Write a function to check if a number is even or odd
โ€ข Create an array of 5 names and print each using a loop
โ€ข Write a condition to check if a user is an adult (age โ‰ฅ 18)

๐Ÿ’ฌ Tap โค๏ธ for more!
  • โค 8
More from @programming_experts
  1. Oct 9, 2026๐Ÿ‡ฎ๐Ÿ‡ณ ๐—š๐—ข๐—ฉ๐—˜๐—ฅ๐—ก๐— ๐—˜๐—ก๐—ง ๐—ข๐—™ ๐—œ๐—ก๐——๐—œ๐—” โ€” ๐—”๐—œ๐—–๐—ง๐—˜ ๐—œ๐—ก๐—ง๐—˜๐—ฅ๐—ก๐—ฆ๐—›๐—œ๐—ฃ๐—ฆ ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ ๐Ÿš€โ€ฆ
  2. Oct 8, 2026๐ŸŽ“ ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—™๐—ฅ๐—˜๐—˜ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ๐˜€! ๐Ÿš€๐Ÿ”ฅ Upgrโ€ฆ
  3. Oct 7, 2026๐ŸงฉNow, Let's Understand Functions in Programming ๐Ÿ‘จโ€๐Ÿ’ป๐Ÿ”ฅ After variables, operators, condiโ€ฆ
  4. Oct 7, 2026๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐโ€ฆ
  5. Oct 7, 2026๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ฃ๐—ผ๐˜„๐—ฒ๐—ฟ ๐—•๐—œ ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜! ๐Ÿ”ฅ Learn Power BI through these FREE learninโ€ฆ
  6. Sep 29, 2026Post #2901
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’