Vai al contenuto principale
ProdottiStrumenti desktopTASTECADVisualizzazione disegniTASTEFILESGestione fileTASTEFTPTrasferimento fileTASTESSHSpazio di lavoro remotoTASTEZIPCompressione ed estrazioneTASTEWINMGestione fileStrumenti per sviluppatoriTASTECODEAmbiente di sviluppo integrato per RustTASTESTUDIOAmbiente integrato di sviluppo e testTASTEETLIntegrazione dati (ETL)ServerTASTEREMOTEServer di desktop remotoTASTEGEOServer geospazialeTASTEMAILSpazio di lavoro emailInvestimentiTASTESTOCKApp desktop di trading automatico azionarioIniziaDownloadDocumentazioneAcquistaTutti i prodotti
Marketplace
Notizie
TecnologiaNotizieNotizie di sviluppo di oggiDocumentazioneLinguaggi di programmazioneRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartFramework frontend webNext.jsReactVue.js · NuxtSvelteKitAngularFramework serverSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressFramework per app e desktopTauriFlutterReact NativeElectronAlgoritmiBasi degli algoritmiAlgoritmi fondamentaliAlgoritmi avanzatiAlgoritmi pratici
CommunityProgettiLog di sviluppoPromptProblemi degli strumenti di IAVetrinaGuida alla community
CollaboraTrasferimento tecnicoRealizzazione del sito webRealizzazione di app desktopPipeline di rilascio e pagamentoPartner commercialeContatti
ServiziDesktop remotoPacchetti di installazione su misura
TASTEDEV
Prodotti

Strumenti desktop

TASTECADApri con leggerezza anche i disegni più complessiTASTEFILESSolo i file che servono, alla massima velocitàTASTEFTPLa via più ordinata per i tuoi fileTASTESSHUn legame più solido tra te e i tuoi serverTASTEZIPComprimi più veloce, estrai più sicuroTASTEWINMUn file manager a due pannelli pensato per la tastiera

Strumenti per sviluppatori

TASTECODEModifica, compila, esegui il debug e testa app Rust in un'unica finestraTASTESTUDIODalla modifica ai test remoti e alle correzioni IA approvateTASTEETLSposta i dati guardando i valori

Server

TASTEREMOTEUn desktop remoto che gira sul tuo serverTASTEGEOUn server geospaziale compatibile con GeoServer, ricostruito in RustTASTEMAILRiprendi il controllo della tua posta

Investimenti

TASTESTOCKTrading automatico azionario secondo le regole che decidi tu: quando e che cosa

Inizia

DownloadUltime versioni di ogni prodottoDocsCome usare ogni prodottoAcquistaAbbonamenti e licenze perpetueTutti i prodottiTutti i prodotti a colpo d’occhio
Tutti i prodotti
MarketplaceNotizie
Tecnologia

Notizie

Notizie di sviluppo di oggiAnnunci ufficiali su linguaggi, framework, GitHub e IADocumentazioneGuide a linguaggi, framework e algoritmi

Linguaggi di programmazione

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Framework

Framework frontend webNext.jsReactVue.js · NuxtSvelteKitAngular
Framework serverSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
Framework per app e desktopTauriFlutterReact NativeElectron

Algoritmi

Basi degli algoritmiAnalisi della complessità · Ordinamento · Ricerca · Strutture dati di base · Alberi e heapAlgoritmi fondamentaliVisita dei grafi · Cammini minimi e alberi ricoprenti · Programmazione dinamica · Algoritmi greedy · Divide et impera · BacktrackingAlgoritmi avanzatiAlgoritmi sulle stringhe · Matematica e teoria dei numeri · Manipolazione dei bit · Alberi di segmenti · Union-FindAlgoritmi praticiStrategia per colloqui di programmazione · Cache LRU · Rate limiting · Hashing consistente
Tutta la documentazione di sviluppo
Community
ProgettiScopri sviluppatori e lavoriLog di sviluppoDecisioni e lezioni appresePromptIstruzioni riutilizzabiliProblemi degli strumenti di IAProblemi e alternative di Claude, Codex, GeminiVetrinaRisultati completatiGuida alla communityCome sviluppiamo in modo aperto
Collabora
Trasferimento tecnicoApp native in Rust ed eguiRealizzazione del sito web10 lingue, account, documentazione e downloadRealizzazione di app desktopRust ed egui, senza WebViewPipeline di rilascio e pagamentoFirma, MSI, deb, rpm, AppImage, hashPartner commercialeConsigliaci e ricevi il 30%ContattiSviluppo, partnership e investimenti
Servizi
Desktop remotoRaggiungi il tuo computer dal browserPacchetti di installazione su misuraSolo il necessario, impostazioni precaricate
Acquista
IT
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Accedi
Accedi
TASTEDEV

Dai piccoli strumenti a uno sviluppo migliore.

support@tastedev.netSostieni TASTEDEV
ProdottiGamma di prodottiAcquistaDocsDownloadMarketplaceAssistenza
CommunityProgettiLog di sviluppoPromptProblemi degli strumenti di IAVetrina
NormeChi siamoInformativa sulla privacyTermini di servizioCondizioni di abbonamentoRimborsiLinee guida della community
AccountAccediRegistrati
Visitatori
Oggi
Ieri
Visualizzazioni totali
Società
GXSOFT
Rappresentante
CHOI YOUNG GU
Numero di registrazione
853-44-00368
Indirizzo
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Telefono
+82-10-4404-1523
E-mail
whitecalvin@tastedev.net
Responsabile privacy
CHOI YOUNG GU

© 2026 TASTEDEVLe informazioni sui prodotti si basano su fonti di sviluppo verificate.Rilasciato · in miglioramento

Documentazione di JavaScript
JavaScript
Getting StartedSyntax BasicsTypes and DataModules and PackagesErrors and TestingKey Concepts: Async and Closures
Discussioni

Guida a JavaScript · 2/6

Syntax Basics

Per ora questo capitolo è disponibile solo in inglese.

This chapter covers the syntax you will read and write every day: declaring variables, writing functions, branching and looping, template literals, and the destructuring and spread syntax that shows up all over modern JavaScript.

let, const and var

There are three ways to declare a variable. Reach for const by default and switch to let only when the variable must be reassigned. var still appears in older code, but there is rarely a reason to write it today.

KeywordReassignableScopeNotes
constNoBlockThe default choice
letYesBlockFor values that change
varYesFunctionHoisting makes it confusing
const greeting = "Hello";
let count = 0;
count += 1;

if (true) {
  let inside = "block";
  var leaked = "function";
}
console.log(leaked); // "function": var escapes the block
// console.log(inside); // ReferenceError: let stays inside it

const user = { name: "Sam" };
user.name = "Alex"; // allowed: const blocks reassignment, not mutation

const does not freeze an object. If you need the contents locked too, use Object.freeze().

Functions and arrow functions

A function declaration can be called from anywhere in its scope. Arrow functions are shorter and shine as callbacks. Both support default values and rest parameters.

function add(a, b) {
  return a + b;
}

// a single-expression body needs no braces or return
const square = (x) => x * x;
const makeUser = (name) => ({ name, createdAt: Date.now() }); // wrap object literals in parentheses

function greet(name = "guest", ...tags) {
  return `${name} (${tags.join(", ")})`;
}

console.log(add(2, 3));                 // 5
console.log(square(4));                 // 16
console.log(greet());                   // "guest ()"
console.log(greet("Kim", "vip", "new")); // "Kim (vip, new)"

Arrow functions also differ in how they treat this; chapter 6 explains why that matters.

Control flow

Compare with === and !==. The loose == converts types first, which is how 0 == "" ends up true.

const fruits = ["apple", "pear", "grape"];

for (const fruit of fruits) {
  console.log(fruit);
}

for (let i = 0; i < fruits.length; i += 1) {
  if (fruits[i] === "pear") continue;
  console.log(i, fruits[i]);
}

const score = 82;
const grade = score >= 90 ? "A" : score >= 80 ? "B" : "C";

switch (grade) {
  case "A":
    console.log("Excellent");
    break;
  case "B":
    console.log("Good");
    break;
  default:
    console.log("Keep going");
}

// optional chaining and nullish coalescing
const config = { server: { port: 0 } };
const port = config.server?.port ?? 3000; // 0, because ?? only replaces null/undefined
const host = config.server?.host ?? "localhost";
Domande su questo capitolo?
Capitolo precedenteGetting StartedCapitolo successivoTypes and Data

for...of walks the values of an array; for...in walks the keys of an object, so prefer for...of for arrays. When supplying defaults, ?? keeps legitimate values like 0 or "" that || would throw away.

Template literals

Backtick strings accept embedded expressions with ${...} and can span several lines.

const item = "keyboard";
const price = 45;

const message = `The ${item} costs $${price.toFixed(2)}.
With shipping: $${(price + 5).toFixed(2)}`;

console.log(message);

Destructuring

Destructuring pulls values out of objects and arrays into variables. You can rename and supply defaults on the way, and it works directly in function parameters.

const order = { id: 17, customer: "Riley", items: ["pen", "notebook"], note: undefined };

const { id, customer: buyer, note = "no note" } = order;
console.log(id, buyer, note); // 17 "Riley" "no note"

const [first, second] = order.items;

// swap two variables
let a = 1;
let b = 2;
[a, b] = [b, a];

function printOrder({ id, items }) {
  console.log(`#${id}: ${items.length} items`);
}
printOrder(order);

Spread

Putting ... in front of an array or object expands its contents. It is the usual way to copy or merge without touching the original. Keep in mind the copy is shallow: nested objects are still shared.

const base = [1, 2, 3];
const more = [...base, 4, 5]; // [1, 2, 3, 4, 5]

const defaults = { theme: "light", lang: "en" };
const settings = { ...defaults, theme: "dark" }; // later keys win

console.log(Math.max(...base)); // 3
console.log(defaults.theme);    // "light", untouched

Summary

  • Default to const, use let for reassignment, and avoid var.
  • Mix declarations and arrow functions as fits; lean on default and rest parameters.
  • Compare with ===; reach for ?. and ?? when a value may be missing.
  • Template literals, destructuring and spread are everywhere in modern code, so practice them until they feel natural.

0 commenti

Commenti principaliPrima i più recenti

Accedi · Accedi per lasciare un commento.