Hello World! I'm
Paing Phyo Ko
>
// transforming ideas into digital reality
// browse my GitHub for my latest projects
const githubLink = "https://github.com/Paing-Ko"
// JavaScript: Fetch data from an API and log the result
async function fetchData() {
try {
const response = await fetch('https://api.example.com/data');
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
}
fetchData();
# Python: A simple function to calculate Fibonacci numbers
def fibonacci(n):
a, b = 0, 1
for _ in range(n):
a, b = b, a + b
return a
print(fibonacci(10))
-- SQL: Query to select the top 10 customers by total spend
SELECT customer_id, SUM(amount) AS total_spend
FROM orders
GROUP BY customer_id
ORDER BY total_spend DESC
LIMIT 10;