https://github.com/bikramai/javascript
JavaScript is one of the most popular and widely used programming languages in the world right now. It’s growing faster than any other programming languages, and big companies like Netflix, Walmart, and PayPal, build entire applications around JavaScript.
https://github.com/bikramai/javascript
Last synced: 2 months ago
JSON representation
JavaScript is one of the most popular and widely used programming languages in the world right now. It’s growing faster than any other programming languages, and big companies like Netflix, Walmart, and PayPal, build entire applications around JavaScript.
- Host: GitHub
- URL: https://github.com/bikramai/javascript
- Owner: Bikramai
- Created: 2024-09-18T02:01:29.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-10-23T23:11:28.000Z (8 months ago)
- Last Synced: 2024-10-24T13:02:38.046Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## JavaScript + Projects
# Section-1: Getting Started
### What is JavaScript?JavaScript is one of the most popular and widely used programming languages in the world right now. It’s growing faster than any other programming languages, and big companies like Netflix, Walmart, and PayPal, build entire applications around JavaScript.
### What can we do with JavaScript?
For a long time, JavaScript was only used in browsers to build interactive web pages. Some developers referred to JavaScript as a toy language. But those days are gone because of huge community support and investments like large companies like Facebook and Google. These days we can build full blown web or mobile apps as well as real-time networking apps like chats and video streaming services, command-line tools, or even games.
### Where does JavaScript code run?
JavaScript was originally designed to run only in browsers. So every browser has what we call a JavaScript Engine that can execute JavaScript code.
For example, the JavaScript engines in Firefox and Chrome are SpiderMonkey and V8. In 2009, a very clever engineer called Brian Doll took the open source JavaScript engine in Chrome, and embedded it inside C++ program. He called that program Node. So Node is a C++ program, that includes Google’s V8 JavaScript engine, Now with this we can run JavaScript code outside of a browser, so we can pass our JavaScript code to Node for execution. And this means with the JavaScript we can build the backend for our web and mobile applications. So in a node shell, JavaScript code can be run inside of a browser, or Node. Browsers and Node provide a runtime environment for our JavaScript code.
### JavaScript vs ECMAScript
Well, ECMA Script is just a specification, JavaScript is a programming language that confirms to this specification. So, we have this organization called ECMA, which is responsible for defining standards, they take of this ECMA Script specification. The first version of ECMA Script was released in 1997. Then, starting in 2015, ECMA has been working on annual releases of a new specification. so in 2015, ECMA Script which is also called ECMA Script version 6, or ES6 for short. This specification defined many new features for JavaScript.
So every browser has JavaScript engine, and we can easily write JavaScript code here in Google without any additional tools. Just for demo# Project-1: Swapping Variables
- Declare 2 variables, and a set it to red, and b set to blue. Now when we log these on the console, obviously we're going to get red and blue. Now, write some code to swap the value of these two variables. So when we log these on the console, instead of getting red and blue, we're going to get blue and red.# Project-2: Max of Two Numbers
- Write a function that takes two numbers and returns the maximum of the two.# Project-3: Landscape or Portrait
- Implement the function isLandsxape, it takes two parameters, width, and fheight of an image, and returns true, if the image is landscape, which means width is greater than height, otherwise it returns false.