June 2025
Intermediate to advanced
837 pages
24h 50m
English
Deno usually works with a fairly recent version of the V8 engine, so you can basically develop modern JavaScript without any restrictions. As an example of how to work with Deno, you should use the source code shown in Listing 28.4.
class Person { #firstname = ''; #lastname = ''; constructor(firstname, lastname) { this.#firstname = firstname; this.#lastname = lastname; } greet() { return `Hello ${this.#firstname} ${this.#lastname}!`; }}const lisa = new Person('Lisa', 'Miller');console.log(lisa.greet()); // Output: Hello Lisa Miller!
Listing 28.4 A Simple Example for Deno
When you save the source code from Listing 28.4 in a file named index.js, you can run the application via the command shown in Listing 28.5.
$ deno run ...Read now
Unlock full access