Alpha ET
Статистика- Последний пост
- 3 янв.
- Последнее чтение
- 13 авг.
- Постов за неделю
- 0
- Всего постов
- 20
- Тип
- открытый
- Язык
- английский
- В каталоге с
- 13 авг.
- 1/24сутки в ленте
- —
- 1/48двое суток
- —
- 1/72трое суток
- —
Оценка по просмотрам недавних постов: пост набирает почти всё за первые сутки.
Посты
Do you agree?
What will the following code print? and why? 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
What will this print? 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
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: // 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
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
JS Challenge 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
JS Tip: Name your variables clearly 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
Alpha ET pinned «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…»
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 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
Alpha ET pinned «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: document.querySelector() .src to change images addEventListener()…»
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: document.querySelector() .src to change images addEventListener() for buttons 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
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 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
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
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
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
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
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
видео или голосовое, без подписи
видео или голосовое, без подписи
видео или голосовое, без подписи