Mission 0: System Command Language
System Briefing: The Ghost in the Machine
The solar flare didn't just corrupt the visual stylesheets; it scrambled the core logic circuits of the fleet. Systems that look perfect are now non-functional or dangerously erratic. Ship AIs are non-responsive, automated drones are offline, and interactive consoles are dead. The problem is no longer cosmetic—it's logical.
As a newly promoted Logic Core Engineer, your mission is to dive into the codebase—the "ghost in the machine"—and use the JavaScript protocol to debug, reprogram, and reboot the functionality of the entire fleet.
Your Primary Tool: The Console
The browser's developer console is your best friend. It's a command line interface inside your browser where you can test code, log messages, and debug issues. You can open it in most browsers by pressing F12 or right-clicking and selecting "Inspect". The most important command is console.log()
, which prints information for you to see.
Operational Directives: Comments
As a Systems Engineer, clear communication is key. Comments are notes in your code that the computer ignores but are crucial for you and other engineers to understand what the code does.
- Single-line comment: Starts with
//
. Everything after it on the same line is ignored. - Multi-line comment: Starts with
/*
and ends with*/
. It can span multiple lines.
// This is a single-line comment.
/*
This is a multi-line comment.
It's useful for longer explanations.
*/
Execution Protocol
JavaScript is an interpreted language, meaning code is executed line by line, from top to bottom. This makes it quick to get started, but it also means the order of your statements matters immensely.
In the following missions, you'll use these fundamentals to write scripts that control the ship's systems.