Foreign Programming Languages
Foreign programming languages use different syntax and rules compared to other
languages. Some of these languages include:
index.html
style.css
script.js
To generate basic HTML, use the following code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>
Another essential part of programming is the console. The console is a tool that
developers use to test their code and debug issues. You can access the console by
pressing Ctrl + Shift + I. Here is an example of using the console:
console.log('hi abdeen');
Recursion is a fundamental concept in programming, and one of the simplest examples
is the factorial function. Here is an implementation of the factorial of 5:
function factorial(num) {
if(num === 1) {
return 1;
}
return num * factorial(num - 1);
}
console.log(factorial(5));
// Output: 120