π What is JavaScript?
JavaScript is a programming language used to make websites interactive.
While HTML builds the structure and CSS styles it, JavaScript brings it to life.
π§ What can JavaScript do?
JavaScript is a programming language used to make websites interactive.
While HTML builds the structure and CSS styles it, JavaScript brings it to life.
π§ What can JavaScript do?
Show alerts and messages
Handle button clicks
Create games
Validate forms (like checking if a name was entered)
Change content on the page without reloading
π§ͺExample:
alert("Hello, world!"); // Try this one on your console.
πΈ JavaScript Execution
I
Browsers π like Chrome interpret and run JavaScript instantly like we are doing right now.
I
nline β inside HTML tags (not recommended for maintainability)
Internal β inside <script> tags in the HTML file
External β linked via .js files (best practice)
Browsers π like Chrome interpret and run JavaScript instantly like we are doing right now.
π§ JavaScript Data Types
In JavaScript, data types tell us what kind of data weβre working with. There are two main categories:
πΉ 1. Primitive Types
2. Non-Primitive (Reference) Types
In JavaScript, data types tell us what kind of data weβre working with. There are two main categories:
πΉ 1. Primitive Types
String β Text
π "Hello"
Number β Numbers
π 42, 3.14
Boolean β True or false
π true, false
Undefined β A variable that hasnβt been given a value yet
π let x;
Null β Intentionally empty
π let y = null;
2. Non-Primitive (Reference) Types
Object β A collection of key-value pairs
π { name: "John", age: 25 }
Array β A list of values
π [1, 2, 3, 4]
Function β Reusable blocks of code
π function greet() { console.log("Hi!") }
Comments
Comments are important in making your code more readable. There are two ways of commenting:
Single line commenting
Multiline commenting
Multiline commenting:
Comments are important in making your code more readable. There are two ways of commenting:
Single line commenting
Multiline commenting
// commenting the code itself with a single comment
// let firstName = 'Yared'; single line comment
// let lastName = 'M'; single line comment
Multiline commenting:
/*
let location = 'AddisAbaba';
let age = 200;
let isMarried = false;
This is a Multiple line comment
*/
π§ JavaScript Variables
Variables are containers that store data in memory. where we keep different types of data (like numbers, text, etc.).
π§ͺ Declaring Variables
βοΈ Avoid using var β it's outdated and can lead to bugs due to weird behavior (weβll talk about that later in scope).
Example:
let age = 25; // can be updated later
const PI = 3.14; // constant value, doesn't change
Variables are containers that store data in memory. where we keep different types of data (like numbers, text, etc.).
π§ͺ Declaring Variables
let β when the value can change
const β when the value wonβt change
βοΈ Avoid using var β it's outdated and can lead to bugs due to weird behavior (weβll talk about that later in scope).
Example:
let age = 25; // can be updated later
const PI = 3.14; // constant value, doesn't change
β Rules for Naming Variables
To create valid variable names, follow these rules:
No starting with numbers
β 1name β β
β name1 β β
Only letters, digits, $, and _ are allowed
β my-name β β
β my_name or myName β β
Use camelCase (recommended)
β userName, totalAmount
No spaces
β user name β β
β userName β β
π½ Looking for YouTube channels but donβt know which ones to follow?
We got you covered! π½
π‘ Here's a curated list of YouTube channels we highly recommend for learners:
π Traversy Media
π Net Ninja
π Fireship
π Web Dev Simplified
π Anson The Developer
π Programming With Mosh
π Telusko
π Amigos Code
π Derek Banas
π Join our Telegram channel for more awesome resources and updates!
π Click here to join
We got you covered! π½
π‘ Here's a curated list of YouTube channels we highly recommend for learners:
π Traversy Media
π Net Ninja
π Fireship
π Web Dev Simplified
π Anson The Developer
π Programming With Mosh
π Telusko
π Amigos Code
π Derek Banas
π Join our Telegram channel for more awesome resources and updates!
π Click here to join
π2
π Awesome Web Dev Projects You Should Try! ππ
If this helped, I think Iβve earned a follow ππ«Άπ»
π Join this channel for daily dev resources, tips, and project ideas!
#Programming #LearnToCode #WebDev
1οΈβ£ 50 Projects in 50 Days β Boost your frontend skills with daily mini projects!
π github.com/bradtraversy/50projects50days
2οΈβ£ Django E-commerce β Build a full-featured online store with Django.
π github.com/justdjango/django-ecommerce
3οΈβ£ JavaScript Quiz App β A sleek and interactive quiz app to test your JS skills!
π github.com/yashcrest/JavaScript-Quiz-App
4οΈβ£ PHP Auth System β Learn how to create secure login and registration from scratch.
π github.com/MedAziz218/php-authentication-system
5οΈβ£ To-Do List β A clean and simple productivity app to manage tasks.
π github.com/groundberry/todo-list
If this helped, I think Iβve earned a follow ππ«Άπ»
π Join this channel for daily dev resources, tips, and project ideas!
#Programming #LearnToCode #WebDev
GitHub
GitHub - bradtraversy/50projects50days: 50+ mini web projects using HTML, CSS & JS
50+ mini web projects using HTML, CSS & JS. Contribute to bradtraversy/50projects50days development by creating an account on GitHub.
π¨ Did You Know? π
The first Apple logo wasnβt the sleek, bitten apple we know today.
It actually featured Sir Isaac Newton sitting under a tree, with an apple about to fall on his head! π³π
π Designed in 1976, the logo had a poetic inscription:
π‘ It was soon replaced by the more modern apple design for simplicity and branding β but what a start for one of the biggest tech companies ever!
Code.IO
The first Apple logo wasnβt the sleek, bitten apple we know today.
It actually featured Sir Isaac Newton sitting under a tree, with an apple about to fall on his head! π³π
π Designed in 1976, the logo had a poetic inscription:
Newton⦠A mind forever voyaging through strange seas of thought⦠alone.
π‘ It was soon replaced by the more modern apple design for simplicity and branding β but what a start for one of the biggest tech companies ever!
Code.IO
π€1
π Meet Your New Study Buddy:
Google NotebookLM by Google Labs
A smarter way to study, summarize, and stay organized. π‘
π§ What is NotebookLM?
π How it Helps Students:
β Summarize large documents in seconds β notes, PDFs, readings, or lectures
β Ask questions directly from your notes (e.g., "What did Chapter 2 say about climate change?")
β Get instant outlines, flashcards, and study guides
β Link multiple sources (docs, PDFs, Drive files) into one smart notebook
π Perfect For:
βοΈ College & university students
βοΈ Thesis writers & researchers
βοΈ High schoolers prepping for exams
βοΈ Anyone drowning in study materials π
Go to πhttps://notebooklm.google.com
Smarter studying = less stress + better grades. ππ
π Save & Share this with your study group!
Code.IO
Google NotebookLM by Google Labs
A smarter way to study, summarize, and stay organized. π‘
π§ What is NotebookLM?
Itβs Googleβs AI-powered note-taking and research assistant , designed to help students like ππΏ YOU understand and organize complex content faster.
π How it Helps Students:
β Summarize large documents in seconds β notes, PDFs, readings, or lectures
β Ask questions directly from your notes (e.g., "What did Chapter 2 say about climate change?")
β Get instant outlines, flashcards, and study guides
β Link multiple sources (docs, PDFs, Drive files) into one smart notebook
π Perfect For:
βοΈ College & university students
βοΈ Thesis writers & researchers
βοΈ High schoolers prepping for exams
βοΈ Anyone drowning in study materials π
Go to π
Smarter studying = less stress + better grades. ππ
π Save & Share this with your study group!
Code.IO
β€1π1
Forwarded from Tech Nerd (Tech Nerd)
If youβre in university, read this.
Donβt let sitting in classrooms and the whole school setup trick you into thinking itβs just like high school β itβs not. Youβre getting older, probably in your 20s. Itβs time to start taking responsibility and thinking about your future, your current and future family.
Iβm honestly surprised by students who still act like theyβre βyoungβ just because theyβre in uni. This is some real brotherly advice β something I think everyone should hear.
(No offense intended⦠but if it does offend you, take it as tough love.)
@selfmadecoder
Donβt let sitting in classrooms and the whole school setup trick you into thinking itβs just like high school β itβs not. Youβre getting older, probably in your 20s. Itβs time to start taking responsibility and thinking about your future, your current and future family.
Iβm honestly surprised by students who still act like theyβre βyoungβ just because theyβre in uni. This is some real brotherly advice β something I think everyone should hear.
(No offense intended⦠but if it does offend you, take it as tough love.)
@selfmadecoder
π2