Coding & Web DevelopmentBeginner4 sectionsUpdated May 24, 2026
JavaScript Basics
Variables
javascript
const name = 'Aminata'; // cannot be reassigned
let score = 0; // can change
score = score + 10;Functions
javascript
function greet(name) {
return `Kushe, ${name}!`;
}
console.log(greet("Ibrahim"));Loops and arrays
javascript
const learners = ['Aminata', 'Mohamed', 'Fatmata'];
for (const learner of learners) {
console.log(learner);
}Useful array methods
| Term | Meaning |
|---|---|
.map() | Transform every item into a new array |
.filter() | Keep only items that match a condition |
.find() | Get the first matching item |
.length | How many items are in the array |
Tagsjavascriptweb
Practise the reference.
Open the compiler, paste one snippet, and change it until you understand what it does.
Related