Cocoscript Logo

Cocoscript

Cocoscript is a mini programming language for learning, testing, and exploring code. Files use the .cocos extension, built on JavaScript, interpreted instantly in your browser or your System using Javascript made Compiler.


Cocoscript Demo Code

hello.cocos
// Function to display text
fx printMsg(str message){
print(message);
}

// Call the function
printMsg("HELLO WORLD");

Key Features

Strict Data Typing

Enforces strict data types, mirroring languages like C/C++ for robust and predictable code execution.

Comprehensive Operators

Supports all standard operators, including arithmetic, logical, and assignment operations.

Modular Functions

Allows complex code to be neatly structured and managed using reusable function blocks.

Conditional Logic

Includes powerful conditional statements: `if`, `if-else` ladders, and the `match` expression (switch).

Structured Control Flow

Features structured loop constructs like `loop` (for), `until` (while), and `doUntil` for iteration.

Minimalist Syntax

Just Created for Fun, but can write simple logics.


Ready to Code?

Dive into the Simple Code Editor and start writing your first `.cocos` file today, and also Can take Docs as reference.

Lets Go !!