For those who were confused this is all JavaScript.
Remember: when you use the + operator with a string, JS does concatenation, not addition. Example from the quiz: 5 + "3" becomes "53". But with the - operator, JS converts strings to numbers, so "10" - 3 becomes 7. Also keep in mind truthy and falsy values: 0, "", null, undefined, false, and NaN are falsy, while things like "0" or [] are truthy.
@alphaETHub
Remember: when you use the + operator with a string, JS does concatenation, not addition. Example from the quiz: 5 + "3" becomes "53". But with the - operator, JS converts strings to numbers, so "10" - 3 becomes 7. Also keep in mind truthy and falsy values: 0, "", null, undefined, false, and NaN are falsy, while things like "0" or [] are truthy.
@alphaETHub
👍2
Today’s Mini Challenge (HTML + CSS + JS)
Build a small page where a button toggles the background color of the header or any element you like.
Just a simple color switch using JavaScript.
Please try it. the more you challenge yourself, the faster you’ll reach your frontend + backend goals.
@alphaETHub
Build a small page where a button toggles the background color of the header or any element you like.
Just a simple color switch using JavaScript.
Please try it. the more you challenge yourself, the faster you’ll reach your frontend + backend goals.
@alphaETHub
Practicing every day is super important without consistency, it gets harder to reach the level you imagine or dream about.
I know I should help you more deeply, but since I don’t have enough time, the best I can do is guide you, suggest resources, and push you in the right direction.
For today, I recommend this 12-hour full course. You don’t need to finish it in one day.
Even 30 minutes a day + practice will make a huge difference.
In one month, you’ll see real progress.
👉 https://youtu.be/lfmg-EJ8gm4?si=rxEaWYb7UAZuVz5A
@alphaETHub
I know I should help you more deeply, but since I don’t have enough time, the best I can do is guide you, suggest resources, and push you in the right direction.
For today, I recommend this 12-hour full course. You don’t need to finish it in one day.
Even 30 minutes a day + practice will make a huge difference.
In one month, you’ll see real progress.
👉 https://youtu.be/lfmg-EJ8gm4?si=rxEaWYb7UAZuVz5A
@alphaETHub
YouTube
JavaScript Full Course for free 🌐
#javascript #tutorial #course
⭐Time Stamps⭐
#1 00:00:00 JavaScript tutorial for beginners 🌐
#2 00:12:32 Variables 📦
#3 00:25:20 Arithmetic operators ➕
#4 00:33:47 Accept user input 💬
#5 00:39:09 Type conversion 💱
#6 00:44:48 Constants 🚫
#7 …
⭐Time Stamps⭐
#1 00:00:00 JavaScript tutorial for beginners 🌐
#2 00:12:32 Variables 📦
#3 00:25:20 Arithmetic operators ➕
#4 00:33:47 Accept user input 💬
#5 00:39:09 Type conversion 💱
#6 00:44:48 Constants 🚫
#7 …
❤3
JavaScript Challenge - Find the Longest Word!
Write a JavaScript program that finds the longest word in a given sentence.
Example input:
"The quick brown fox jumps over the lazy dog"
Expected output:
"jumps" (or "quick"/"brown", if same length —your choice)
💡 Hints:
- Split the sentence into words (split(' '))
- Loop through the array and compare lengths
- Keep track of the longest word so far
- Return or console.log it
share your code in the comments when you’re done.
@alphaETHub
Write a JavaScript program that finds the longest word in a given sentence.
Example input:
"The quick brown fox jumps over the lazy dog"
Expected output:
"jumps" (or "quick"/"brown", if same length —your choice)
💡 Hints:
- Split the sentence into words (split(' '))
- Loop through the array and compare lengths
- Keep track of the longest word so far
- Return or console.log it
share your code in the comments when you’re done.
@alphaETHub
This site is honestly a gold mine
It has super short and clear cheat sheets for HTML, CSS, and JavaScript ,perfect for quick revision or learning fast.
Check it out 👇
https://htmlcheatsheet.com/js/
@alphaETHub
It has super short and clear cheat sheets for HTML, CSS, and JavaScript ,perfect for quick revision or learning fast.
Check it out 👇
https://htmlcheatsheet.com/js/
@alphaETHub
Htmlcheatsheet
JavaScript (JS) Cheat Sheet Online
JavaScript Cheat Seet contains useful code examples on a single page. Not just a PDF because it's interactive! Find code for JS loops, variables, objects and
❤4
JavaScript DOM
The DOM (Document Object Model) lets you access & control HTML using JavaScript.
Here are the most useful things you’ll use daily:
🔹 Select Elements
🔹 Change Text / HTML
🔹 Change Styles
🔹 Create & Add Elements
🔹 Events
@alphaETHub
The DOM (Document Object Model) lets you access & control HTML using JavaScript.
Here are the most useful things you’ll use daily:
🔹 Select Elements
document.getElementById("id")
document.querySelector(".class")
document.querySelectorAll("p")🔹 Change Text / HTML
element.textContent = "Hello"
element.innerHTML = "<b>Hi</b>"
🔹 Change Styles
element.style.color = "blue"
element.style.background = "black"
🔹 Create & Add Elements
const div = document.createElement("div")
div.textContent = "New Box"
document.body.appendChild(div)🔹 Events
button.addEventListener("click", () => {
alert("Clicked!")
})@alphaETHub
❤1
Today’s Exercise : Build an Image Slider (DOM Project)
Your task for today is simple but fun:
👉 Create an Image Slider using JavaScript DOM
(slide left ➡️ right ⬅️ by clicking buttons)
Use:
No need to make it perfect just make it work.
If you want, send your work in the group, or if you don’t feel confident yet, try it by yourself first.
The important thing is learning by doing.
@alphaETHub
Your task for today is simple but fun:
👉 Create an Image Slider using JavaScript DOM
(slide left ➡️ right ⬅️ by clicking buttons)
Use:
document.querySelector()
.src to change imagesaddEventListener() for buttonsNo need to make it perfect just make it work.
If you want, send your work in the group, or if you don’t feel confident yet, try it by yourself first.
The important thing is learning by doing.
@alphaETHub
👍1
Today’s Exercise: Build a To-Do List App (DOM Practice)
If you completed yesterday’s image slider, great job!
Today let’s build something useful:
👉 A Simple To-Do List App using JavaScript DOM
Requirements:
- Add new tasks
- Mark tasks as done
- Delete tasks
Use
It doesn’t need to look perfect , just make it work.
Send your work in the group( @alphadiscuzz ) if you want!
@alphaETHub
If you completed yesterday’s image slider, great job!
Today let’s build something useful:
👉 A Simple To-Do List App using JavaScript DOM
Requirements:
- Add new tasks
- Mark tasks as done
- Delete tasks
Use
querySelector(), createElement(), appendChild(), addEventListener()It doesn’t need to look perfect , just make it work.
Send your work in the group( @alphadiscuzz ) if you want!
@alphaETHub
👍3❤1🤬1
JS Tip: Name your variables clearly
Bad variable names make your code confusing.
Good names make you learn faster.
❌ Bad
✅ Good
This is one of the easiest ways to improve your JavaScript from day one.
@alphaETHub
Bad variable names make your code confusing.
Good names make you learn faster.
❌ Bad
let x = 5;
let y = "John";
✅ Good
let userAge = 5;
let userName = "John";
This is one of the easiest ways to improve your JavaScript from day one.
@alphaETHub
❤3👍1
JS Challenge
In JavaScript, this happens a lot in real projects:
Challenge:
Make a safe variable called city that doesn’t break even if address is missing.
Hint: use ?.
Try it. Comment your answer 👇
@alphaETHHub
In JavaScript, this happens a lot in real projects:
const user = {
name: "Sam",
address: { city: "Addis", code: 1000 }
};Challenge:
Make a safe variable called city that doesn’t break even if address is missing.
Hint: use ?.
Try it. Comment your answer 👇
@alphaETHHub
👍4❤1
Did you know? JavaScript was created in 1995 by Brendan Eich in just 10 days! Originally called Mocha, then LiveScript, it became the language that powers almost every website today.
@alphaETHub
@alphaETHub
👍5
Did you know you can store data permanently in the browser even after refreshing or closing the page?
It’s called localStorage super useful for saving theme, username, settings, etc.
Example:
This is how websites remember your preferences without asking again.
@alphaETHub
It’s called localStorage super useful for saving theme, username, settings, etc.
Example:
// Save data
localStorage.setItem("theme", "dark");
// Get data
console.log(localStorage.getItem("theme"));
// Remove data
localStorage.removeItem("theme");
This is how websites remember your preferences without asking again.
@alphaETHub
👍1
What will this print?
React with your answer:
👍 0 then 2
🔥 1 then 2
❤️ 0 then 1
😍 1 then 1
@alphaETHub
let x = 0;
console.log(x++);
console.log(++x);
React with your answer:
👍 0 then 2
🔥 1 then 2
❤️ 0 then 1
😍 1 then 1
@alphaETHub
❤2👍1
What will the following code print? and why?
A) 1
B) 2
C) 3
D) 5
@alphaETHub
let a = 5; // 0101 in binary
let b = 3; // 0011 in binary
console.log(a & b);
A) 1
B) 2
C) 3
D) 5
@alphaETHub
👏1