logo
Spark Docs
logo
Spark Docs
DocumentationCore ConceptsSyntax & Basics

Syntax & Basics

Learn the fundamentals of the 🔥 Spark programming language.

Spark is a simple programming language built on top of JavaScript. It does not execute code directly, but transpiles Spark syntax into JavaScript and runs it using the Node.js runtime.

Core Concepts

Variableslet

Declared using the let keyword before use

Assignment

Values are assigned after declaration, not during it

Print Statementprint

Output values using the print keyword

Execution

Spark code is transpiled to JavaScript and executed with Node.js

File Extension

Spark source files use the .sp extension. For example: main.sp, variables.sp

Print Statement

The print keyword outputs values to the console.

# Print a simple string
print "Hello, World!"

# Print numbers
print 42
print 3.14

# Print boolean values
print true
print false

Code Comments

Comments start with the # symbol. Everything after # on a line is ignored by the Spark compiler.

# This is a single-line comment
print "Hello, Spark!"