# JavaScript (JS) smart contract

<figure><img src="/files/PsG7acd0ylUUq7uACtyy" alt=""><figcaption></figcaption></figure>

### The new era of smart contracts by QANplatform has arrived.

The QAN Virtual Machine (QVM) allows developers to write smart contracts in any programming language. This is a breakthrough for the whole blockchain ecosystem since most blockchain platforms are only compatible with the Ethereum smart contract language, Solidity.&#x20;

Launching in 2023, QANplatform will be the first quantum-resistant Layer 1 hybrid blockchain platform where developers can write smart contracts in any programming language. Before the official private and public blockchain launch, QAN is publishing some puzzle pieces of its upcoming technology, such as the QVM, where developers can test the multi-language smart contract feature on the Ethereum Sepolia Testnet as a Layer 2 smart contract execution engine.&#x20;

Following the [Go (Golang) sample release](https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/supported-languages/go-golang), QANplatform is releasing the documentation and the first smart contract sample for the most used programming language worldwide, JavaScript.&#x20;

### JavaScript, the most used programming language

Created in 1995 (yes, more than 25 years ago!) by [Brendan Eich](https://twitter.com/BrendanEich), this programming language was initially named “LiveScript” only to be rebranded as JavaScript (JS) right before its official release. JavaScript is also special in terms of its broad fields of its adoption. This language is used on a widest spectrum of hardware (e.g. ranging from the tiniest microcontrollers through PCs and servers to spacecrafts), and software (e.g. this very webpage you are looking at is also powered by JavaScript.&#x20;

For the past years, JavaScript has proved its effectiveness, and nothing proves this better than the fact that JavaScript has been the most used programming language for ten years in a row, according to [GitHub](https://octoverse.github.com/2022/top-programming-languages) and [Stackoverflow](https://survey.stackoverflow.co/2022/#overview) statistics. According to [Statista](https://www.statista.com/statistics/1241923/worldwide-software-developer-programming-language-communities/) there were 17.4 million developers worldwide who can code in JavaScript as of 2022. It is safe to say that one of the most used languages of the Web2 era is JavaScript, which is still used today by popular companies such as Facebook, Uber, Netflix, PayPal, LinkedIn, etc.&#x20;

### Write smart contracts in JavaScript

However there are some JavaScript samples, libraries, SDKs, and APIs where developers can interact with a blockchain (e.g. query the blockchain, send transactions, interact with a node), there are only few blockchains where developers can code smart contracts in JavaScript. QANplatform allows developers to build: smart contract, DApp, DeFi, DAO, token, CBDC, NFT, Metaverse, and Web3 solutions in JavaScript.&#x20;

### Benefits of JavaScript smart contracts

Suppose you are a single developer looking to play around with blockchain. In that case, you can finally do that since you are not forced to learn a new programming language in your free time, like Solidity - which you could only use for specific purposes. Instead, you can use your current JavaScript knowledge that you may possibly already mastered for several years or even a decade.&#x20;

\
If you are a CEO, CTO, CINO, CBDO looking to innovate with blockchain technology you can benefit from QANplatform’s [multi-language smart contract](https://learn.qanplatform.com/technology/technology-features/multi-language-smart-contracts-or-hyperpolyglot) feature as well. No need to hire or train Solidity programmers, since you can already use your inhouse development team or your current IT partner. It makes talent acquisitions, development, and codebase maintenance easier and cost-efficient for enterprises.<br>

### It’s time to write your first smart contract in JavaScript

Blockchain platforms only reward validators (miners, stakers) and node providers in their own utility tokens; however, smart contract developers are the ones who are building use cases and products on the blockchain to reach mass adoption. Imagine that GitHub would reward developers when their code is getting re-used by others. [QANplatform will reward developers](https://learn.qanplatform.com/technology/technology-features/developer-royalty-fees) on the QAN MainNet; therefore, you can already prepare some code libraries while playing around with QAN Virtual Machine and JavaScript smart contracts.<br>

{% content-ref url="/pages/Ei1whwHX6cglBf5Dat2n" %}
[Writing a smart contract in JavaScript (JS)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js-smart-contract/writing-a-smart-contract-in-javascript-js.md)
{% endcontent-ref %}

{% content-ref url="/pages/Wr89vjSqSAKcmxA3Bdyx" %}
[Compiling a smart contract in JavaScript (JS)](/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js-smart-contract/compiling-a-smart-contract-in-javascript-js.md)
{% endcontent-ref %}

\
\
\
\
\ <br>

\ <br>

\ <br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.qanplatform.com/developers/qvm-multi-language-smart-contracts/docs-for-supported-languages/javascript-js-smart-contract.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
