Orangemn6's blog


Orangemn6's blog


11 Crazy Things You Can Do with JavaScript

Orangemn6's photo
·May 10, 2021·

7 min read

The unreal applications of JavaScript

Photo by [Joe Caione]( on [Unsplash]( by Joe Caione on Unsplash

When it comes to JavaScript, you are only limited by your imagination.

JavaScript apps are becoming increasingly complex every passing day and it is being used to create some of the most insane things one can imagine.

Below are some of the unheard applications of JavaScript.

1. Machine Learning

Machine learning is a trending subject these days.

You can add cool machine learning features to your next app using JavaScript.

Since web browsers have access to webcams and mics, you have access to visual and sound inputs which can lead to some interesting machine learning features such as Face Recognition.

Using the TensorFlow library for JavaScript you can build truly amazing projects that leverage machine learning such as real-time piano performance.

It allows you to run as well as retain existing trained models, besides building new models from scratch.

There are a variety of other libraries as well such as Brain.js and deeplearn.

ml5.js is another friendly machine learning library to create and explore artificial intelligence in the browser.

It provides access to algorithms and is built on top of TensorFlow.js.

2. Games

With the introduction of HTML5 canvas, gaming on web browsers has advanced drastically.

The level of control and possibilities have increased for these games so much so that there are browser games that help you learn to program.

Many libraries/frameworks have also come forward to ease the development process of JavaScript games. One such library is Phaser.

Phaser lets you create HTML games that run directly in the browser.

You can also create digital interactive content using Pixi.js.

3.Animate Websites

Using JavaScript, you can add insane animations and transition effects to breathe a new life into your dull website.

Adding spinners to a heavily loaded site can make the web experience a little better for the end consumer.

You can even add slides and other intuitive animations.

Using Three.js, you can build complex 3D animations without much trouble.

You can add professional looking scroll animations that not only look lovely but also are easy to implement using the ScrollReveal library.

4. Slides

Using RevealJS, you get access to a fully-fledged presentation framework that will enable you to create amazing presentations.

Moreover, these presentations can run directly in the web browser since they are made using JavaScript, HTML, and CSS.

If you don’t want to learn this tool then you can head over to the Slides website, which uses RevealJS under the hood, to create stunning presentations that run on the web browser.

One advantage of using JavaScript to make presentations is that you won’t run into compatibility issues since all the presentations can run on the web.

5. Mobile Apps

If you have been following any JavaScript framework or in general learning the language, you must have come across this use-case of JavaScript at least once.

JavaScript allows the creation of cross-platform apps that allows developers to make iOS and Android compatible apps using the same codebase.

Mainly there are 2 frameworks that facilitate mobile app development: Ionic and React Native.

Personally, I have worked with React Native and I love the fact that I can use the same language to create apps for the web as well as the mobile platforms.

React Native is Facebook’s library and renders the native components of the platform.

On the other hand, with Ionic, you can use Angular, React, and Vue to create fast mobile apps. However, it is worth noting that Ionic builds Progressive Web Application that tends to behave like native apps.

6. Digital Art

You can create stunning 3D elements using JavaScript and HTML5 canvas element.

The canvas element has a vast range of methods that give developers the freedom to bring into reality complex artworks.

Methods such as drawing paths, boxes, and circles can lead to some fine digital art.

Using JavaScript, you can create Generative Art, algorithmically determined computer-generated artwork.

You can find a good manually curated collection of resources and tools for producing Generative Art here.

7. Controlling Robots and Drones

These days, you can manipulate robots, drones, and other machines using JavaScript.

Most quadcopters come embedded with a basic OS that is sufficient to install NodeJS.

You can combine this knowledge with some of the awesome libraries to control flying drones and robots.

With Cylon.js, command robots and devices using JavaScript.

Additionally, there is the AR Drone which provides a high-level API to stream video, send instructions, and return data.

There are events and seminars that are entirely geared towards this segment such as the NodeCopter event.

8. Desktop Applications

Yes, besides building native mobile apps, you can build desktop apps as well with JavaScript

ElectronJS is a JavaScript framework that enables you to build cross-platform desktop apps.

The best part about using ElectronJS for me was that I didn’t have to learn any tools to get started.

ElectronJS uses existing web technologies such as HTML, CSS, and JavaScript to create native applications.

You can build apps for Windows, Mac as well as Linux using it.

Moreover, thousands of organizations are already this framework. Some prominent ones are Twitch, Whatsapp, Slack, and Visual Studio Code.

9. Smart Watches

Not only can you build applications for the Pebble watches using Pebble.js but also there is a smartwatch, Bangle.js, which is an open-sourced JavaScript-powered smartwatch.

However, you can even run JavaScript apps on Samsung Gear 2 and Gear S using 3rd party apps like APE Pad.

And it’s not complex at all!

You can find a detailed set of instructions to get your JavaScript up and running in Samsung Gear watches here.

But what if you want to build for Apple Watch?

There is Alpha WatchBench which lets you do exactly that.

10. VR and AR Apps

Virtual and Augmented Reality is considered the tech of the future.

The idea of a VR app is not new, but the fact that you can use JavaScript to build and incorporate VR apps and features might sound unfamiliar to most developers.

Using VR to create an immersive experience or fun games like an endless runner — it’s all possible with JavaScript.

MDN has got us covered with a good in-depth guide exploring the JavaScript API. Udemy also has an excellent course for beginners to quickly get started.

A-Frame is a popular framework created by the Mozilla VR team to allow developers to create 3D and VR experiences without even knowing WebGL.

One of the core advantages of A-Frame is that it uses plain HTML and it’s a powerful entity-component framework.

11. Serverless Functions

JavaScript allows using a single app with a lot of independent functions to perform particular operations.

This allows you to focus on the code and not the infrastructure. This is the basic architecture of the serverless application, which is gaining popularity lately.

It is possible to convert any NodeJS app into a scalable Serverless app.

One can use NodeJS to write Lambda functions(AWS) and Cloud functions(Google Cloud).

There are various benefits that come when using Serverless apps such as focusing on the code and not the actual infrastructure, paying for what you use, and scaling is a lot easier.

Final Thoughts

There are some really insane things you can do with JavaScript and I have attempted to cover some of the craziest things one can do with JS.

The fact that one language which is very beginner-friendly and intuitive can be used to build mobile and desktop apps as well as used in the field of game and VR development is truly mind-boggling.

However, JavaScript is not limited just to this, as you can even implement Machine Learning and generate creative art.

One can even use JS to build professional-looking presentations and website animations.

Automating things and controlling IoT devices is another thing one can achieve with JS. Controlling robots and drones is possible.

As stated earlier, when it comes to JavaScript, you are only limited by your imagination!

Enjoyed this article? If so, get more similar content by reading the rest of my blog! Thanks!

Share this