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
VariablesletDeclared using the let keyword before use
AssignmentValues are assigned after declaration, not during it
Print StatementprintOutput values using the print keyword
ExecutionSpark 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 falseCode 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!"