Day 15 of 21 Days of Javascript

I'm starting to get used to the JS lingo. But I still find it an awkward language that's missing some modern capabilities. For example, here's how you create a list in Python:

# Create a list of numbers from 1 up to 4
numbers = list(range(1, 5))

print(numbers)  # Outputs [1, 2, 3, 4]

And here's how you do it in Javascript.

// Create an array of numbers from 1 to 4
let numbers = Array.from({ length: 4 }, (_, i) => i + 1);

console.log(numbers); // Outputs [1, 2, 3, 4]

I'd choose Python for most tasks, except that if you're building web apps, you can do more with Javascript on the frontend. Hence my attempt at learning it.

Different languages are good for different domains of work. Python is a fantastic backend tool. It's also popular for maths, science, and machine learning and AI projects. Javascript on the other hand was built for browsers and web apps and it tends to do better there.