English Esperanto
You are viewing this page in Basic HTML view [Switch to a different view]
.cjs
Not to be confused with .JS or .cjs .mjs
MIME type: text/x-javascript
Is binary? No
Is encrypted? No
Can execute dangerous code? Yes (example: malware written in the programming language)
Related extensions: .cjs .CJS .JS .mcjs .MJS .JSON .cjson
Internet Media types: e
Uniform Type Identifier (UTI) ????
Type code ????
Magic number ????
The capital doesn't differentiate the 2 files by much. They both still function the same.
A .cjs file has multiple definitions. See below for examples.
Click/tap here to expand/collapse this section
Any (Windows, Windows 9x, Windows NT, Linux, GNU/Linux, Classic MacOS, MacOS, MacOS X, OS X, iOS, Android, OS/2, ChromiumOS, ChromeOS, Solaris, FreeBSD, NetBSD, OpenBSD, DragonflyBSD, etc.)
Opens with:
Gedit (GNOME/Linux) (free & Libre) (Open Source)
Notepad++ (Windows NT, Linux (free & Libre) (Open Source))
GNOME Text Editor (GNOME/Linux) (free & Libre) (Open Source)
Eclipse (IDE, Windows, MacOS, Linux, BSD) (Free) (Open source)
Notepad (Windows, included with all versions of the operating system) (Proprietary)
Other/Suggest one
Click/tap here to expand/collapse the definitions for this file
Definition 1: cjs Source code
A .cjs file is a source code file for the JavaScript programming language. It is an extremely common language used by most websites, although its usage can be problematic. JavaScript is heavily inspired by Java, and beginning developers sometimes get the 2 confused.
Here is an example of a Hello World program in this language:
// Declares a function-scoped variable named `x`, and implicitly assigns the
// special value `undefined` to it. Variables without value are automatically
// set to undefined.
var x;
// Variables can be manually set to `undefined` like so
var x2 = undefined;
// Declares a block-scoped variable named `y`, and implicitly sets it to
// `undefined`. The `let` keyword was introduced in ECMAScript 2015.
let y;
// Declares a block-scoped, un-reassignable variable named `z`, and sets it to
// a string literal. The `const` keyword was also introduced in ECMAScript 2015,
// and must be explicitly assigned to.
// The keyword `const` means constant, hence the variable cannot be reassigned
// as the value is `constant`.
const z = "this value cannot be reassigned!";
// Declares a variable named `myNumber`, and assigns a number literal (the value
// `2`) to it.
let myNumber = 2;
// Reassigns `myNumber`, setting it to a string literal (the value `"foo"`).
// JavaScript is a dynamically-typed language, so this is legal.
myNumber = "foo";
Definition 2: Pseudo-extension (null)
A pseudo-extension is a file format that is applied to a file, despite not having a purpose, other than to change the file name (such as JS.cjs) however this file extension is rarely used as a pseudo-extension
Alternatives
None listed
No other definitions
Limitations and problems
Unknown
History
No history to show. Maintainers of this project should add a history of the format here.
Version history
There are only ? versions of the JavaScript programming language, which are used in this file.
The following table needs to be reformatted.
Usage
cjs files are used to write and execute JavaScript programs.
No other definitions
Shebang? Unknown
Encoding: Unknown
File icon
Click/tap here to expand/collapse this section
GNOME 1:
GNOME 2:
GNOME 3:
GNOME 40:
GNOME 41:
KDE 1:
KDE 2:
KDE 3:
KDE 4:
KDE 5:
XFCE:
LXQT:
CINNAMON:
Common Desktop Environment (CDE):
MacOS (Classic):
MacOS (Mac OS X):
MacOS (OS X):
MacOS (MacOS 10.10-10.12):
MacOS (Modern, pre-MacOS11):
MacOS (Modern, MacOS11):
WinRAR:
Android:
iOS:
Windows (DOS):
Windows (9x):
Windows (NT):
Solaris: