Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <script> class Car { constructor(name) { this.brand = name; } present() { return 'I have a ' + this.brand; } } const mycar = new Car("Ford"); document.write(mycar.present()); </script> </body> </html>