Get started with babel-polyfill CDN

MIT licensed

Babel Polyfill: Modern JS features for older browsers. Write next-gen code, use it there.

Tags:
  • compiler
  • JavaScript
  • babel
  • ast
  • flavortown
  • es6
  • es2015

Stable version

Copied!

How to start using babel-polyfill CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with babel-polyfill CDN - cdnhub.io</title>
  <script src="https://cdn.cdnhub.io/babel-polyfill/7.12.1/polyfill.min.js"></script>
</head>
<body>
  <script>
    // Using 'babel-polyfill' to enable modern JavaScript features
    'use strict';

    // Modern JavaScript features, like arrow functions and classes, can be used here
    const add = (a, b) => a + b;

    class Person {
      constructor(name) {
        this.name = name;
      }

      greet() {
        console.log(`Hello, ${this.name}!`);
      }
    }

    const person = new Person('John Doe');
    person.greet();

    // The result will be: "Hello, John Doe!"
  </script>
</body>
</html>
Copied!
Copied!

All versions