100% found this document useful (2 votes)
5 views

Javascript info Ebook Part 1 The JavaScript language 1st Edition Ilya Kantor download

The document is an introduction to JavaScript, detailing its evolution from a browser-only language to a versatile programming language used in various environments. It covers fundamental concepts, capabilities, limitations, and the unique aspects of JavaScript, as well as resources for further learning. Additionally, it mentions other languages that transpile to JavaScript, enhancing its functionality and ease of use.

Uploaded by

efogkie3027
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (2 votes)
5 views

Javascript info Ebook Part 1 The JavaScript language 1st Edition Ilya Kantor download

The document is an introduction to JavaScript, detailing its evolution from a browser-only language to a versatile programming language used in various environments. It covers fundamental concepts, capabilities, limitations, and the unique aspects of JavaScript, as well as resources for further learning. Additionally, it mentions other languages that transpile to JavaScript, enhancing its functionality and ease of use.

Uploaded by

efogkie3027
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 69

Javascript info Ebook Part 1 The JavaScript

language 1st Edition Ilya Kantor download

https://textbookfull.com/product/javascript-info-ebook-
part-1-the-javascript-language-1st-edition-ilya-kantor/

Download full version ebook from https://textbookfull.com


We believe these products will be a great fit for you. Click
the link to download now, or visit textbookfull.com
to discover even more!

Javascript info Ebook Part 3 Additional articles 1st


Edition Ilya Kantor

https://textbookfull.com/product/javascript-info-ebook-
part-3-additional-articles-1st-edition-ilya-kantor/

Javascript info Ebook Part 2 Browser Document Events


Interfaces 1st Edition Ilya Kantor

https://textbookfull.com/product/javascript-info-ebook-
part-2-browser-document-events-interfaces-1st-edition-ilya-
kantor/

JavaScript Learn JavaScript in 24 Hours or Less A


Beginner s Guide To Learning JavaScript Programming Now
JavaScript JavaScript Programming 1st Edition Robert
Dwight.
https://textbookfull.com/product/javascript-learn-javascript-
in-24-hours-or-less-a-beginner-s-guide-to-learning-javascript-
programming-now-javascript-javascript-programming-1st-edition-
robert-dwight/

Functional Programming in JavaScript How to improve


your JavaScript programs using functional techniques 1
edition Edition Luis Atencio

https://textbookfull.com/product/functional-programming-in-
javascript-how-to-improve-your-javascript-programs-using-
functional-techniques-1-edition-edition-luis-atencio/
JavaScript Design Patterns 1 / converted Edition Hugo
Di Francesco

https://textbookfull.com/product/javascript-design-
patterns-1-converted-edition-hugo-di-francesco/

The Joy of JavaScript 1st Edition Atencio

https://textbookfull.com/product/the-joy-of-javascript-1st-
edition-atencio/

Practical Modern JavaScript Dive into ES6 and the


Future of JavaScript Nicolás Bevacqua

https://textbookfull.com/product/practical-modern-javascript-
dive-into-es6-and-the-future-of-javascript-nicolas-bevacqua/

Beginning Functional JavaScript. Functional Programming


with JavaScript using EcmaScript 6 1st Edition Anto
Aravinth

https://textbookfull.com/product/beginning-functional-javascript-
functional-programming-with-javascript-using-ecmascript-6-1st-
edition-anto-aravinth/

Simplifying JavaScript Writing Modern JavaScript with


ES5 ES6 and Beyond 1st Edition Joe Morgan

https://textbookfull.com/product/simplifying-javascript-writing-
modern-javascript-with-es5-es6-and-beyond-1st-edition-joe-morgan/
Part 1

The JavaScript
language

Ilya Kantor
Built at July 10, 2019
The last version of the tutorial is at https://javascript.info.

We constantly work to improve the tutorial. If you find any mistakes, please write at our github.
● An introduction

An Introduction to JavaScript

Manuals and specifications
● Code editors

Developer console
● JavaScript Fundamentals
● Hello, world!
● Code structure

The modern mode, "use strict"
● Variables

Data types
● Type Conversions

Operators
● Comparisons

Interaction: alert, prompt, confirm

Conditional operators: if, '?'

Logical operators

Loops: while and for

The "switch" statement

Functions
● Function expressions and arrows
● JavaScript specials
● Code quality
● Debugging in Chrome
● Coding Style
● Comments

Ninja code
● Automated testing with mocha
● Polyfills

Objects: the basics

Objects
● Garbage collection
● Symbol type

Object methods, "this"
● Object to primitive conversion
● Constructor, operator "new"

Data types
● Methods of primitives
● Numbers
● Strings

Arrays
● Array methods
● Iterables

Map, Set, WeakMap and WeakSet

Object.keys, values, entries
● Destructuring assignment
● Date and time

JSON methods, toJSON
● Advanced working with functions
● Recursion and stack
● Rest parameters and spread operator
● Closure
● The old "var"
● Global object
● Function object, NFE
● The "new Function" syntax
● Scheduling: setTimeout and setInterval

Decorators and forwarding, call/apply
● Function binding
● Currying and partials

Arrow functions revisited
● Object properties configuration
● Property flags and descriptors

Property getters and setters
● Prototypes, inheritance
● Prototypal inheritance
● F.prototype
● Native prototypes
● Prototype methods, objects without __proto__
● Classes
● Class basic syntax
● Class inheritance
● Static properties and methods
● Private and protected properties and methods
● Extending built-in classes

Class checking: "instanceof"
● Mixins
● Error handling

Error handling, "try..catch"
● Custom errors, extending Error
● Promises, async/await
● Introduction: callbacks
● Promise
● Promises chaining
● Error handling with promises
● Promise API
● Promisification
● Microtasks
● Async/await
● Generators, advanced iteration

Generators
● Async iterators and generators
● Modules

Modules, introduction
● Export and Import
● Dynamic imports

Miscellaneous

Proxy and Reflect
● Eval: run a code string
Here we learn JavaScript, starting from scratch and go on to advanced concepts like OOP.
We concentrate on the language itself here, with the minimum of environment-specific notes.

An introduction
About the JavaScript language and the environment to develop with it.

An Introduction to JavaScript
Let’s see what’s so special about JavaScript, what we can achieve with it, and which other
technologies play well with it.

What is JavaScript?

JavaScript was initially created to “make web pages alive”.

The programs in this language are called scripts. They can be written right in a web page’s
HTML and run automatically as the page loads.

Scripts are provided and executed as plain text. They don’t need special preparation or
compilation to run.
In this aspect, JavaScript is very different from another language called Java  .

 Why JavaScript?
When JavaScript was created, it initially had another name: “LiveScript”. But Java was very
popular at that time, so it was decided that positioning a new language as a “younger
brother” of Java would help.

But as it evolved, JavaScript became a fully independent language with its own specification
called ECMAScript  , and now it has no relation to Java at all.

Today, JavaScript can execute not only in the browser, but also on the server, or actually on any
device that has a special program called the JavaScript engine  .

The browser has an embedded engine sometimes called a “JavaScript virtual machine”.

Different engines have different “codenames”. For example:


● V8  – in Chrome and Opera.
● SpiderMonkey  – in Firefox.
● …There are other codenames like “Trident” and “Chakra” for different versions of IE,
“ChakraCore” for Microsoft Edge, “Nitro” and “SquirrelFish” for Safari, etc.

The terms above are good to remember because they are used in developer articles on the
internet. We’ll use them too. For instance, if “a feature X is supported by V8”, then it probably
works in Chrome and Opera.
 How do engines work?
Engines are complicated. But the basics are easy.

1. The engine (embedded if it’s a browser) reads (“parses”) the script.


2. Then it converts (“compiles”) the script to the machine language.
3. And then the machine code runs, pretty fast.

The engine applies optimizations at each step of the process. It even watches the compiled
script as it runs, analyzes the data that flows through it, and applies optimizations to the
machine code based on that knowledge. When it’s done, scripts run quite fast.

What can in-browser JavaScript do?

Modern JavaScript is a “safe” programming language. It does not provide low-level access to
memory or CPU, because it was initially created for browsers which do not require it.

JavaScript’s capabilities greatly depend on the environment it’s running in. For instance,
Node.js  supports functions that allow JavaScript to read/write arbitrary files, perform network
requests, etc.

In-browser JavaScript can do everything related to webpage manipulation, interaction with the
user, and the webserver.

For instance, in-browser JavaScript is able to:


● Add new HTML to the page, change the existing content, modify styles.
● React to user actions, run on mouse clicks, pointer movements, key presses.

Send requests over the network to remote servers, download and upload files (so-called
AJAX  and COMET  technologies).

Get and set cookies, ask questions to the visitor, show messages.

Remember the data on the client-side (“local storage”).

What CAN’T in-browser JavaScript do?

JavaScript’s abilities in the browser are limited for the sake of the user’s safety. The aim is to
prevent an evil webpage from accessing private information or harming the user’s data.
Examples of such restrictions include:
● JavaScript on a webpage may not read/write arbitrary files on the hard disk, copy them or
execute programs. It has no direct access to OS system functions.

Modern browsers allow it to work with files, but the access is limited and only provided if the
user does certain actions, like “dropping” a file into a browser window or selecting it via an
<input> tag.

There are ways to interact with camera/microphone and other devices, but they require a
user’s explicit permission. So a JavaScript-enabled page may not sneakily enable a web-
camera, observe the surroundings and send the information to the NSA  .
● Different tabs/windows generally do not know about each other. Sometimes they do, for
example when one window uses JavaScript to open the other one. But even in this case,
JavaScript from one page may not access the other if they come from different sites (from a
different domain, protocol or port).
This is called the “Same Origin Policy”. To work around that, both pages must agree for data
exchange and contain a special JavaScript code that handles it. We’ll cover that in the
tutorial.
This limitation is, again, for the user’s safety. A page from http://anysite.com which a
user has opened must not be able to access another browser tab with the URL
http://gmail.com and steal information from there.
● JavaScript can easily communicate over the net to the server where the current page came
from. But its ability to receive data from other sites/domains is crippled. Though possible, it
requires explicit agreement (expressed in HTTP headers) from the remote side. Once again,
that’s a safety limitation.

Such limits do not exist if JavaScript is used outside of the browser, for example on a server.
Modern browsers also allow plugin/extensions which may ask for extended permissions.

What makes JavaScript unique?

There are at least three great things about JavaScript:

● Full integration with HTML/CSS.



Simple things are done simply.

Support by all major browsers and enabled by default.
JavaScript is the only browser technology that combines these three things.

That’s what makes JavaScript unique. That’s why it’s the most widespread tool for creating
browser interfaces.

While planning to learn a new technology, it’s beneficial to check its perspectives. So let’s move
on to the modern trends affecting it, including new languages and browser abilities.

Languages “over” JavaScript

The syntax of JavaScript does not suit everyone’s needs. Different people want different
features.

That’s to be expected, because projects and requirements are different for everyone.

So recently a plethora of new languages appeared, which are transpiled (converted) to


JavaScript before they run in the browser.

Modern tools make the transpilation very fast and transparent, actually allowing developers to
code in another language and auto-converting it “under the hood”.

Examples of such languages:


● CoffeeScript  is a “syntactic sugar” for JavaScript. It introduces shorter syntax, allowing us
to write clearer and more precise code. Usually, Ruby devs like it.
● TypeScript  is concentrated on adding “strict data typing” to simplify the development and
support of complex systems. It is developed by Microsoft.

Flow  also adds data typing, but in a different way. Developed by Facebook.

Dart  is a standalone language that has its own engine that runs in non-browser
environments (like mobile apps), but also can be transpiled to JavaScript. Developed by
Google.

There are more. Of course, even if we use one of transpiled languages, we should also know
JavaScript to really understand what we’re doing.

Summary
● JavaScript was initially created as a browser-only language, but is now used in many other
environments as well.

Today, JavaScript has a unique position as the most widely-adopted browser language with
full integration with HTML/CSS.
● There are many languages that get “transpiled” to JavaScript and provide certain features. It
is recommended to take a look at them, at least briefly, after mastering JavaScript.

Manuals and specifications


This book is a tutorial. It aims to help you gradually learn the language. But once you’re familiar
with the basics, you’ll need other sources.

Specification
The ECMA-262 specification contains the most in-depth, detailed and formalized information
about JavaScript. It defines the language.

But being that formalized, it’s difficult to understand at first. So if you need the most trustworthy
source of information about the language details, the specification is the right place. But it’s not
for everyday use.

The latest draft is at https://tc39.es/ecma262/  .

To read about new bleeding-edge features, that are “almost standard”, see proposals at
https://github.com/tc39/proposals  .

Also, if you’re in developing for the browser, then there are other specs covered in the second
part of the tutorial.

Manuals
● MDN (Mozilla) JavaScript Reference is a manual with examples and other information. It’s
great to get in-depth information about individual language functions, methods etc.

One can find it at https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference  .

Although, it’s often best to use an internet search instead. Just use “MDN [term]” in the query,
e.g. https://google.com/search?q=MDN+parseInt  to search for parseInt function.

MSDN – Microsoft manual with a lot of information, including JavaScript (often referrerd to as
JScript). If one needs something specific to Internet Explorer, better go there:
http://msdn.microsoft.com/  .

Also, we can use an internet search with phrases such as “RegExp MSDN” or “RegExp
MSDN jscript”.

Feature support

JavaScript is a developing language, new features get added regularly.

To see their support among browser-based and other engines, see:


● http://caniuse.com  – per-feature tables of support, e.g. to see which engines support
modern cryptography functions: http://caniuse.com/#feat=cryptography  .
● https://kangax.github.io/compat-table  – a table with language features and engines that
support those or don’t support.

All these resources are useful in real-life development, as they contain valuable information
about language details, their support etc.

Please remember them (or this page) for the cases when you need in-depth information about a
particular feature.

Code editors
A code editor is the place where programmers spend most of their time.
There are two main types of code editors: IDEs and lightweight editors. Many people use one
tool of each type.

IDE

The term IDE  (Integrated Development Environment) refers to a powerful editor with many
features that usually operates on a “whole project.” As the name suggests, it’s not just an editor,
but a full-scale “development environment.”

An IDE loads the project (which can be many files), allows navigation between files, provides
autocompletion based on the whole project (not just the open file), and integrates with a version
management system (like git  ), a testing environment, and other “project-level” stuff.

If you haven’t selected an IDE yet, consider the following options:


● Visual Studio Code  (cross-platform, free).

WebStorm  (cross-platform, paid).

For Windows, there’s also “Visual Studio”, not to be confused with “Visual Studio Code”. “Visual
Studio” is a paid and mighty Windows-only editor, well-suited for the .NET platform. It’s also
good at JavaScript. There’s also a free version Visual Studio Community  .

Many IDEs are paid, but have a trial period. Their cost is usually negligible compared to a
qualified developer’s salary, so just choose the best one for you.

Lightweight editors

“Lightweight editors” are not as powerful as IDEs, but they’re fast, elegant and simple.

They are mainly used to open and edit a file instantly.

The main difference between a “lightweight editor” and an “IDE” is that an IDE works on a
project-level, so it loads much more data on start, analyzes the project structure if needed and
so on. A lightweight editor is much faster if we need only one file.

In practice, lightweight editors may have a lot of plugins including directory-level syntax
analyzers and autocompleters, so there’s no strict border between a lightweight editor and an
IDE.

The following options deserve your attention:



Atom  (cross-platform, free).

Sublime Text  (cross-platform, shareware).

Notepad++  (Windows, free).

Vim  and Emacs  are also cool if you know how to use them.

Let’s not argue

The editors in the lists above are those that either I or my friends whom I consider good
developers have been using for a long time and are happy with.

There are other great editors in our big world. Please choose the one you like the most.
The choice of an editor, like any other tool, is individual and depends on your projects, habits,
and personal preferences.

Developer console
Code is prone to errors. You will quite likely make errors… Oh, what am I talking about? You are
absolutely going to make errors, at least if you’re a human, not a robot  .

But in the browser, users don’t see errors by default. So, if something goes wrong in the script,
we won’t see what’s broken and can’t fix it.

To see errors and get a lot of other useful information about scripts, “developer tools” have been
embedded in browsers.

Most developers lean towards Chrome or Firefox for development because those browsers
have the best developer tools. Other browsers also provide developer tools, sometimes with
special features, but are usually playing “catch-up” to Chrome or Firefox. So most developers
have a “favorite” browser and switch to others if a problem is browser-specific.

Developer tools are potent; they have many features. To start, we’ll learn how to open them,
look at errors, and run JavaScript commands.

Google Chrome

Open the page bug.html.

There’s an error in the JavaScript code on it. It’s hidden from a regular visitor’s eyes, so let’s
open developer tools to see it.
Press F12 or, if you’re on Mac, then Cmd+Opt+J .

The developer tools will open on the Console tab by default.

It looks somewhat like this:

The exact look of developer tools depends on your version of Chrome. It changes from time to
time but should be similar.

Here we can see the red-colored error message. In this case, the script contains an unknown
“lalala” command.

On the right, there is a clickable link to the source bug.html:12 with the line number
where the error has occurred.
Below the error message, there is a blue > symbol. It marks a “command line” where we can
type JavaScript commands. Press Enter to run them ( Shift+Enter to input multi-line
commands).

Now we can see errors, and that’s enough for a start. We’ll come back to developer tools later
and cover debugging more in-depth in the chapter Debugging in Chrome.

Firefox, Edge, and others

Most other browsers use F12 to open developer tools.

The look & feel of them is quite similar. Once you know how to use one of these tools (you can
start with Chrome), you can easily switch to another.

Safari

Safari (Mac browser, not supported by Windows/Linux) is a little bit special here. We need to
enable the “Develop menu” first.

Open Preferences and go to the “Advanced” pane. There’s a checkbox at the bottom:

Now Cmd+Opt+C can toggle the console. Also, note that the new top menu item named
“Develop” has appeared. It has many commands and options.

Multi-line input

Usually, when we put a line of code into the console, and then press Enter , it executes.

To insert multiple lines, press Shift+Enter .

Summary

Developer tools allow us to see errors, run commands, examine variables, and much more.
● They can be opened with F12 for most browsers on Windows. Chrome for Mac needs
Cmd+Opt+J , Safari: Cmd+Opt+C (need to enable first).

Now we have the environment ready. In the next section, we’ll get down to JavaScript.

JavaScript Fundamentals
Let’s learn the fundamentals of script building.

Hello, world!
This part of the tutorial is about core JavaScript, the language itself. Later on, you’ll learn about
Node.js and other platforms that use it.

But we need a working environment to run our scripts and, since this book is online, the
browser is a good choice. We’ll keep the amount of browser-specific commands (like alert )
to a minimum so that you don’t spend time on them if you plan to concentrate on another
environment (like Node.js). We’ll focus on JavaScript in the browser in the next part of the
tutorial.
So first, let’s see how we attach a script to a webpage. For server-side environments (like
Node.js), you can execute the script with a command like "node my.js" .

The “script” tag

JavaScript programs can be inserted into any part of an HTML document with the help of the
<script> tag.

For instance:

<!DOCTYPE HTML>
<html>

<body>

<p>Before the script...</p>

<script>
alert( 'Hello, world!' );
</script>

<p>...After the script.</p>

</body>

</html>

The <script> tag contains JavaScript code which is automatically executed when the
browser processes the tag.

Modern markup
The <script> tag has a few attributes that are rarely used nowadays but can still be found in
old code:

The type attribute: <script type=…>


The old HTML standard, HTML4, required a script to have a type . Usually it was
type="text/javascript" . It’s not required anymore. Also, the modern HTML standard,
HTML5, totally changed the meaning of this attribute. Now, it can be used for JavaScript
modules. But that’s an advanced topic; we’ll talk about modules in another part of the tutorial.

The language attribute: <script language=…>


This attribute was meant to show the language of the script. This attribute no longer makes
sense because JavaScript is the default language. There is no need to use it.

Comments before and after scripts.


In really ancient books and guides, you may find comments inside <script> tags, like this:

<script type="text/javascript"><!--
...
//--></script>

This trick isn’t used in modern JavaScript. These comments hid JavaScript code from old
browsers that didn’t know how to process the <script> tag. Since browsers released in the
last 15 years don’t have this issue, this kind of comment can help you identify really old code.

External scripts

If we have a lot of JavaScript code, we can put it into a separate file.

Script files are attached to HTML with the src attribute:

<script src="/path/to/script.js"></script>

Here, /path/to/script.js is an absolute path to the script file (from the site root).

You can also provide a relative path from the current page. For instance, src="script.js"
would mean a file "script.js" in the current folder.

We can give a full URL as well. For instance:

<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.2.0/lodash.js"></script>

To attach several scripts, use multiple tags:

<script src="/js/script1.js"></script>
<script src="/js/script2.js"></script>

 Please note:
As a rule, only the simplest scripts are put into HTML. More complex ones reside in
separate files.
The benefit of a separate file is that the browser will download it and store it in its cache  .

Other pages that reference the same script will take it from the cache instead of
downloading it, so the file is actually downloaded only once.
That reduces traffic and makes pages faster.

⚠ If src is set, the script content is ignored.

A single <script> tag can’t have both the src attribute and code inside.

This won’t work:

<script src="file.js">
alert(1); // the content is ignored, because src is set
</script>

We must choose either an external <script src="…"> or a regular <script> with


code.

The example above can be split into two scripts to work:

<script src="file.js"></script>
<script>
alert(1);
</script>

Summary
● We can use a <script> tag to add JavaScript code to a page.
● The type and language attributes are not required.

A script in an external file can be inserted with <script src="path/to/script.js">
</script> .

There is much more to learn about browser scripts and their interaction with the webpage. But
let’s keep in mind that this part of the tutorial is devoted to the JavaScript language, so we
shouldn’t distract ourselves with browser-specific implementations of it. We’ll be using the
browser as a way to run JavaScript, which is very convenient for online reading, but only one of
many.

✔ Tasks

Show an alert
importance: 5

Create a page that shows a message “I’m JavaScript!”.

Do it in a sandbox, or on your hard drive, doesn’t matter, just ensure that it works.

Demo in new window 

To solution

Show an alert with an external script


importance: 5

Take the solution of the previous task Show an alert. Modify it by extracting the script content
into an external file alert.js , residing in the same folder.

Open the page, ensure that the alert works.

To solution

Code structure
The first thing we’ll study is the building blocks of code.

Statements

Statements are syntax constructs and commands that perform actions.


We’ve already seen a statement, alert('Hello, world!') , which shows the message
“Hello, world!”.

We can have as many statements in our code as we want. Statements can be separated with a
semicolon.

For example, here we split “Hello World” into two alerts:

alert('Hello'); alert('World');

Usually, statements are written on separate lines to make the code more readable:

alert('Hello');
alert('World');

Semicolons

A semicolon may be omitted in most cases when a line break exists.

This would also work:


alert('Hello')
alert('World')

Here, JavaScript interprets the line break as an “implicit” semicolon. This is called an automatic
semicolon insertion  .

In most cases, a newline implies a semicolon. But “in most cases” does not mean
“always”!
There are cases when a newline does not mean a semicolon. For example:

alert(3 +
1
+ 2);

The code outputs 6 because JavaScript does not insert semicolons here. It is intuitively
obvious that if the line ends with a plus "+" , then it is an “incomplete expression”, so the
semicolon is not required. And in this case that works as intended.
But there are situations where JavaScript “fails” to assume a semicolon where it is really
needed.
Errors which occur in such cases are quite hard to find and fix.
 An example of an error
If you’re curious to see a concrete example of such an error, check this code out:

[1, 2].forEach(alert)

No need to think about the meaning of the brackets [] and forEach yet. We’ll study
them later. For now, just remember the result of the code: it shows 1 then 2 .

Now, let’s add an alert before the code and not finish it with a semicolon:

alert("There will be an error")

[1, 2].forEach(alert)

Now if we run the code, only the first alert is shown and then we have an error!

But everything is fine again if we add a semicolon after alert :

alert("All fine now");

[1, 2].forEach(alert)

Now we have the “All fine now” message followed by 1 and 2 .

The error in the no-semicolon variant occurs because JavaScript does not assume a
semicolon before square brackets [...] .

So, because the semicolon is not auto-inserted, the code in the first example is treated as a
single statement. Here’s how the engine sees it:

alert("There will be an error")[1, 2].forEach(alert)

But it should be two separate statements, not one. Such a merging in this case is just
wrong, hence the error. This can happen in other situations.

We recommend putting semicolons between statements even if they are separated by


newlines. This rule is widely adopted by the community. Let’s note once again – it is possible to
leave out semicolons most of the time. But it’s safer – especially for a beginner – to use them.

Comments

As time goes on, programs become more and more complex. It becomes necessary to add
comments which describe what the code does and why.
Comments can be put into any place of a script. They don’t affect its execution because the
engine simply ignores them.
One-line comments start with two forward slash characters // .

The rest of the line is a comment. It may occupy a full line of its own or follow a statement.
Like here:

// This comment occupies a line of its own


alert('Hello');

alert('World'); // This comment follows the statement

Multiline comments start with a forward slash and an asterisk /* and end with an
asterisk and a forward slash */ .

Like this:

/* An example with two messages.


This is a multiline comment.
*/
alert('Hello');
alert('World');

The content of comments is ignored, so if we put code inside /* … */ , it won’t execute.

Sometimes it can be handy to temporarily disable a part of code:

/* Commenting out the code


alert('Hello');
*/
alert('World');

 Use hotkeys!
In most editors, a line of code can be commented out by pressing the Ctrl+/ hotkey for a
single-line comment and something like Ctrl+Shift+/ – for multiline comments (select a
piece of code and press the hotkey). For Mac, try Cmd instead of Ctrl .

⚠ Nested comments are not supported!


There may not be /*...*/ inside another /*...*/ .

Such code will die with an error:

/*
/* nested comment ?!? */
*/
alert( 'World' );
Please, don’t hesitate to comment your code.
Comments increase the overall code footprint, but that’s not a problem at all. There are many
tools which minify code before publishing to a production server. They remove comments, so
they don’t appear in the working scripts. Therefore, comments do not have negative effects on
production at all.
Later in the tutorial there will be a chapter Code quality that also explains how to write better
comments.

The modern mode, "use strict"


For a long time, JavaScript evolved without compatibility issues. New features were added to
the language while old functionality didn’t change.
That had the benefit of never breaking existing code. But the downside was that any mistake or
an imperfect decision made by JavaScript’s creators got stuck in the language forever.
This was the case until 2009 when ECMAScript 5 (ES5) appeared. It added new features to the
language and modified some of the existing ones. To keep the old code working, most
modifications are off by default. You need to explicitly enable them with a special directive:
"use strict" .

“use strict”

The directive looks like a string: "use strict" or 'use strict' . When it is located at
the top of a script, the whole script works the “modern” way.

For example:

"use strict";

// this code works the modern way


...

We will learn functions (a way to group commands) soon.

Looking ahead, let’s just note that "use strict" can be put at the start of most kinds of
functions instead of the whole script. Doing that enables strict mode in that function only. But
usually, people use it for the whole script.
⚠ Ensure that “use strict” is at the top
Please make sure that "use strict" is at the top of your scripts, otherwise strict mode
may not be enabled.

Strict mode isn’t enabled here:

alert("some code");
// "use strict" below is ignored--it must be at the top

"use strict";

// strict mode is not activated

Only comments may appear above "use strict" .

⚠ There’s no way to cancel use strict


There is no directive like "no use strict" that reverts the engine to old behavior.

Once we enter strict mode, there’s no return.

Browser console

For the future, when you use a browser console to test features, please note that it doesn’t use
strict by default.

Sometimes, when use strict makes a difference, you’ll get incorrect results.

You can try to press Shift+Enter to input multiple lines, and put use strict on top, like
this:

'use strict'; <Shift+Enter for a newline>


// ...your code
<Enter to run>

It works in most browsers, namely Firefox and Chrome.

If it doesn’t, the most reliable way to ensure use strict would be to input the code into
console like this:

(function() {
'use strict';

// ...your code...
})()

Always “use strict”


We have yet to cover the differences between strict mode and the “default” mode.
In the next chapters, as we learn language features, we’ll note the differences between the strict
and default modes. Luckily, there aren’t many and they actually make our lives better.
For now, it’s enough to know about it in general:

1. The "use strict" directive switches the engine to the “modern” mode, changing the
behavior of some built-in features. We’ll see the details later in the tutorial.
2. Strict mode is enabled by placing "use strict" at the top of a script or function. Several
language features, like “classes” and “modules”, enable strict mode automatically.
3. Strict mode is supported by all modern browsers.
4. We recommended always starting scripts with "use strict" . All examples in this tutorial
assume strict mode unless (very rarely) specified otherwise.

Variables
Most of the time, a JavaScript application needs to work with information. Here are two
examples:
1. An online shop – the information might include goods being sold and a shopping cart.
2. A chat application – the information might include users, messages, and much more.

Variables are used to store this information.

A variable

A variable  is a “named storage” for data. We can use variables to store goodies, visitors, and
other data.

To create a variable in JavaScript, use the let keyword.

The statement below creates (in other words: declares or defines) a variable with the name
“message”:

let message;

Now, we can put some data into it by using the assignment operator = :

let message;

message = 'Hello'; // store the string

The string is now saved into the memory area associated with the variable. We can access it
using the variable name:

let message;
message = 'Hello!';
alert(message); // shows the variable content

To be concise, we can combine the variable declaration and assignment into a single line:

let message = 'Hello!'; // define the variable and assign the value

alert(message); // Hello!

We can also declare multiple variables in one line:

let user = 'John', age = 25, message = 'Hello';

That might seem shorter, but we don’t recommend it. For the sake of better readability, please
use a single line per variable.

The multiline variant is a bit longer, but easier to read:

let user = 'John';


let age = 25;
let message = 'Hello';

Some people also define multiple variables in this multiline style:

let user = 'John',


age = 25,
message = 'Hello';

…Or even in the “comma-first” style:

let user = 'John'


, age = 25
, message = 'Hello';

Technically, all these variants do the same thing. So, it’s a matter of personal taste and
aesthetics.
 var instead of let
In older scripts, you may also find another keyword: var instead of let :

var message = 'Hello';

The var keyword is almost the same as let . It also declares a variable, but in a slightly
different, “old-school” way.

There are subtle differences between let and var , but they do not matter for us yet.
We’ll cover them in detail in the chapter The old "var".

A real-life analogy

We can easily grasp the concept of a “variable” if we imagine it as a “box” for data, with a
uniquely-named sticker on it.

For instance, the variable message can be imagined as a box labeled "message" with the
value "Hello!" in it:

We can put any value in the box.


We can also change it as many times as we want:

let message;

message = 'Hello!';

message = 'World!'; // value changed

alert(message);

When the value is changed, the old data is removed from the variable:

We can also declare two variables and copy data from one into the other.
let hello = 'Hello world!';

let message;

// copy 'Hello world' from hello into message


message = hello;

// now two variables hold the same data


alert(hello); // Hello world!
alert(message); // Hello world!

 Functional languages
It’s interesting to note that there exist functional  programming languages, like Scala 
or Erlang  that forbid changing variable values.

In such languages, once the value is stored “in the box”, it’s there forever. If we need to
store something else, the language forces us to create a new box (declare a new variable).
We can’t reuse the old one.
Though it may seem a little odd at first sight, these languages are quite capable of serious
development. More than that, there are areas like parallel computations where this limitation
confers certain benefits. Studying such a language (even if you’re not planning to use it
soon) is recommended to broaden the mind.

Variable naming

There are two limitations on variable names in JavaScript:

1. The name must contain only letters, digits, or the symbols $ and _ .
2. The first character must not be a digit.

Examples of valid names:

let userName;
let test123;

When the name contains multiple words, camelCase  is commonly used. That is: words go
one after another, each word except first starting with a capital letter: myVeryLongName .

What’s interesting – the dollar sign '$' and the underscore '_' can also be used in names.
They are regular symbols, just like letters, without any special meaning.

These names are valid:

let $ = 1; // declared a variable with the name "$"


let _ = 2; // and now a variable with the name "_"

alert($ + _); // 3
Examples of incorrect variable names:

let 1a; // cannot start with a digit

let my-name; // hyphens '-' aren't allowed in the name

 Case matters
Variables named apple and AppLE are two different variables.

 Non-Latin letters are allowed, but not recommended


It is possible to use any language, including cyrillic letters or even hieroglyphs, like this:

let имя = '...';


let 我 = '...';

Technically, there is no error here, such names are allowed, but there is an international
tradition to use English in variable names. Even if we’re writing a small script, it may have a
long life ahead. People from other countries may need to read it some time.

⚠ Reserved names
There is a list of reserved words  , which cannot be used as variable names because they
are used by the language itself.

For example: let , class , return , and function are reserved.

The code below gives a syntax error:

let let = 5; // can't name a variable "let", error!


let return = 5; // also can't name it "return", error!
⚠ An assignment without use strict
Normally, we need to define a variable before using it. But in the old times, it was technically
possible to create a variable by a mere assignment of the value without using let . This
still works now if we don’t put use strict in our scripts to maintain compatibility with old
scripts.

// note: no "use strict" in this example

num = 5; // the variable "num" is created if it didn't exist

alert(num); // 5

This is a bad practice and would cause an error in strict mode:

"use strict";

num = 5; // error: num is not defined

Constants

To declare a constant (unchanging) variable, use const instead of let :

const myBirthday = '18.04.1982';

Variables declared using const are called “constants”. They cannot be changed. An attempt
to do so would cause an error:

const myBirthday = '18.04.1982';

myBirthday = '01.01.2001'; // error, can't reassign the constant!

When a programmer is sure that a variable will never change, they can declare it with const
to guarantee and clearly communicate that fact to everyone.

Uppercase constants
There is a widespread practice to use constants as aliases for difficult-to-remember values that
are known prior to execution.

Such constants are named using capital letters and underscores.

For instance, let’s make constants for colors in so-called “web” (hexadecimal) format:

const COLOR_RED = "#F00";


const COLOR_GREEN = "#0F0";
const COLOR_BLUE = "#00F";
const COLOR_ORANGE = "#FF7F00";

// ...when we need to pick a color


let color = COLOR_ORANGE;
alert(color); // #FF7F00

Benefits:

COLOR_ORANGE is much easier to remember than "#FF7F00" .
● It is much easier to mistype "#FF7F00" than COLOR_ORANGE .

When reading the code, COLOR_ORANGE is much more meaningful than #FF7F00 .

When should we use capitals for a constant and when should we name it normally? Let’s make
that clear.
Being a “constant” just means that a variable’s value never changes. But there are constants
that are known prior to execution (like a hexadecimal value for red) and there are constants that
are calculated in run-time, during the execution, but do not change after their initial assignment.

For instance:

const pageLoadTime = /* time taken by a webpage to load */;

The value of pageLoadTime is not known prior to the page load, so it’s named normally. But
it’s still a constant because it doesn’t change after assignment.

In other words, capital-named constants are only used as aliases for “hard-coded” values.

Name things right

Talking about variables, there’s one more extremely important thing.


A variable name should have a clean, obvious meaning, describe the data that it stores.

Variable naming is one of the most important and complex skills in programming. A quick
glance at variable names can reveal which code was written by a beginner versus an
experienced developer.
In a real project, most of the time is spent modifying and extending an existing code base rather
than writing something completely separate from scratch. When we return to some code after
doing something else for a while, it’s much easier to find information that is well-labeled. Or, in
other words, when the variables have good names.

Please spend time thinking about the right name for a variable before declaring it. Doing so will
repay you handsomely.

Some good-to-follow rules are:



Use human-readable names like userName or shoppingCart .

Stay away from abbreviations or short names like a , b , c , unless you really know what
you’re doing.
● Make names maximally descriptive and concise. Examples of bad names are data and
value . Such names say nothing. It’s only okay to use them if the context of the code makes
it exceptionally obvious which data or value the variable is referencing.
● Agree on terms within your team and in your own mind. If a site visitor is called a “user” then
we should name related variables currentUser or newUser instead of
currentVisitor or newManInTown .

Sounds simple? Indeed it is, but creating descriptive and concise variable names in practice is
not. Go for it.

 Reuse or create?
And the last note. There are some lazy programmers who, instead of declaring new
variables, tend to reuse existing ones.

As a result, their variables are like boxes into which people throw different things without
changing their stickers. What’s inside the box now? Who knows? We need to come closer
and check.
Such programmers save a little bit on variable declaration but lose ten times more on
debugging.

An extra variable is good, not evil.

Modern JavaScript minifiers and browsers optimize code well enough, so it won’t create
performance issues. Using different variables for different values can even help the engine
optimize your code.

Summary

We can declare variables to store data by using the var , let , or const keywords.
● let – is a modern variable declaration. The code must be in strict mode to use let in
Chrome (V8).
● var – is an old-school variable declaration. Normally we don’t use it at all, but we’ll cover
subtle differences from let in the chapter The old "var", just in case you need them.

const – is like let , but the value of the variable can’t be changed.

Variables should be named in a way that allows us to easily understand what’s inside them.

✔ Tasks

Working with variables


importance: 2

1. Declare two variables: admin and name .


2. Assign the value "John" to name .
3. Copy the value from name to admin .
4. Show the value of admin using alert (must output “John”).
Other documents randomly have
different content
"Started it, yes. Increased the power of the field, I don't know," said
Docchi. He outlined what he thought had taken place.
"That sounds logical," agreed Jordan. "But it doesn't matter how it
was done. Gravity engineers would find it interesting. If we had time
I'd like to see how the circuits are crossed. We might discover
something new."
"I'm sure it's interesting," said Anti irritably. "Interesting to
everybody but me. And I'm pragmatic. All I want to know is: when
do we start the rockets? We've got a long way to go."
"There's something that comes before that, Anti," said Jordan. "A
retracted combustion cap in flight generally means at least one
burned out tube." He made his way to the instruments, checking
them glumly. "This time it's three."
"You forgot something yourself, Jordan," said Docchi. "I was thinking
of the robot."
"I thought we'd settled that," said Anti impatiently.
"We have. But let's follow it through. Where did the robot get
instructions? Not from Vogel via the radio. The ship's hull cuts off
that band. And the last we knew it was in our control."
"Voice," said Jordan. "We freed it. Someone else could take it over."
"Who?" said Anti. "None of us."
"No. But think back to when we were loading the tank. We saw it
through the telecom and the angle of vision was bad. You couldn't
see anything that wasn't directly overhead. Not only the robot but
Cameron also managed to get inside."
Jordan hefted the weapon. "So we've got another hunt on our
hands. Only this time it's in our favor. Nothing I like better than
aiming at a nice normal doctor."
Docchi glanced at the weapon. "Take it along. But don't use it. A
homicide would ruin us. We could forget what we're going for.
Anyway, you won't actually need it. The ship's temporarily disabled
and he'll consider that damage enough. He'll be ready to surrender."
He was.
5
The doctor was at ease, confident. "You've got the ship and you've
caught me. How long do you think you can keep either of us?"
Docchi regarded him levelly. "I don't expect active cooperation but
I'd like to think you'll give us your word not to hinder us hereafter."
Cameron glared at the toaster. "I won't promise anything."
"We can chain him to Anti," suggested Jordan. "That will keep him
out of trouble."
"Don't wince, Cameron," said Docchi. "She was a woman once. An
attractive one too."
"We can put him in a spacesuit and lock his hands behind his back,"
said Jordan. "Like the old-fashioned straitjacket."
Cameron laughed loudly. "Go ahead."
Jordan juggled the toaster. "I can use this to weld with. Let's put him
in a cabin and close the door, permanently. I'll cut a slot to shove
food in—a very narrow slot."
"Excellent. That's the solution. Cameron, do you want to reconsider
your decision?"
Cameron shrugged blithely. "They'll pick you up in a day or less
anyway. I'm not compromising myself if I agree."
"It's good enough for me," declared Anti. "A doctor's word is as good
as his oath—Hippocratic or hypocritic."
"Don't be cynical, Anti. Doctors have an economic sense as well as
the next person," said Docchi. He turned to Cameron. "You see,
after Anti grew too massive for her skeletal structure, doctors
reasoned she'd be most comfortable in the absence of gravity. That
was in the early days, before successful ship gravity units were
developed. They put her on an interplanetary ship and kept
transferring her before each landing.
"But the treatment was troublesome—and expensive. So they
devised a new method—the asteroid and the tank of acid. Not being
aquatic by nature, Anti resented the change. She still does."
"Don't blame me for that," said Cameron. "I wasn't responsible."
"It was before your time," agreed Docchi. He frowned speculatively
at the doctor. "I noticed it at the time but I had other things to think
about. Tell me, why did you laugh when Jordan mentioned
spacesuits?"
Cameron grinned broadly. "That was my project while you were busy
with the robot."
"To do what? Jordan——"
But Jordan was already on his way. He was gone for some time,
minutes that passed slowly.
"Well?" asked Docchi on Jordan's return. The question was hardly
necessary; his face told the story.
"Cut to ribbons."
"All of them? Even the emergency pack?"
"That too. He knew where everything was. Nothing can be repaired."
"So who cares?" rumbled Anti. "We don't need spacesuits unless
something happens and we have to go outside the ship."
"Exactly, Anti. How do we replace the defective tubes? From the
outside, of course. By destroying the spacesuits Cameron made sure
we can't."
Anti glowered at the doctor. "And I suppose you merely had our
welfare at heart. Isn't that so, Cameron?"
"You can think anything you want. I did and I do," said Cameron
imperturbably. "Now be reasonable. We're still in the asteroid zone.
In itself that's not dangerous. Without power to avoid stray rocks it
can be very unpleasant. My advice is to contact the Medicouncil at
once. They'll send a ship to take us in."
"Thanks, no. I don't like Handicap Haven as well as you," Anti said
brusquely. She turned to Docchi. "Maybe I'm stupid for asking but
what's so deadly about being in space without a spacesuit?"
"Cold. Lack of pressure. Lack of oxygen."
"Is that all? Nothing else?"
His voice was too loud; it seemed thunderous to him. "Isn't that
enough?"
"Maybe not for me. I just wanted to be sure." She beckoned to Nona
and together they went forward, where the spacesuits were kept.
"Don't do anything drastic until I get back," she said as she left.
Cameron scowled puzzledly and started to follow until Jordan waved
the toaster in front of him. "All right, I see it," he growled, stopping
and rubbing his chin. "There's nothing she can do. You know it as
well as I do."
"Do I? Well, for once I'm inclined to agree with you," said Docchi.
"But you never can tell with Anti. Sometimes she comes up with
surprising things. She's not scientifically trained but she has a good
mind, as good as her body once was."
"And how good was that?" asked Cameron ironically.
"Look it up in your records," said Jordan shortly. "We don't talk
about it ourselves."

The women didn't come back soon, and when they did Cameron
wasn't sure that the weird creature that floated into the control
compartment with Nona was Anti. He looked again and saw
shudderingly what she had done to herself. "You do need
psychotherapy," he said bitingly. "When we get back it's the first
thing I'll recommend. Can't you understand how fool-hardy you're
being?"
"Be quiet," growled Jordan. "Anti, explain what you've rigged up. I'm
not sure we can let you do it."
"Any kind of pressure will do as far as the outside of the body is
concerned," answered Anti, flipping back the helmet. "Mechanical
pressure is as satisfactory as air. I had Nona cut the spacesuit in
strips and wind them around me, very hard. That will keep me from
squishing out. Then I found a helmet that would cover my head
when the damaged part was cut away. It won't hold much air
pressure even taped tight to my skin. It doesn't have to as long as
it's pure oxygen."
"So far it makes sense," admitted Docchi. "But what can you do
about temperature?"
"Do you think I'm going to worry about cold?" asked Anti. "Me? Way
down below all this flesh? Mountains and mountains of it?"
"I've heard enough," said Cameron, standing in front of Anti. "Now
listen to me. Stop this nonsense and take off that childish rig. I can't
permit you to ruin my career by deliberate suicide."
"You and your stinking career," said Jordan disgustedly. "You don't
know what success is and what it means to give it up. Stay out of
this. We don't have to ask your permission to do anything." Cameron
retreated from the toaster and Jordan turned to Anti. "Do you
understand what the risk, is, Anti? You know that it may not work at
all?"
"I've thought about it," said Anti. "On the other hand I've thought
about the asteroid. I don't want to go back."
"We should have viewers outside," said Docchi. "One directly in
back, one on each side. At least we'll know what's happening."
At the control panel Jordan began flipping levers. "They're out and
working," he said at last. "Anti, go to the freight ramp. Close your
helmet and wait. I'll let the air out slowly. If everything doesn't work
perfectly let me know on the helmet radio and I'll yank you in
immediately. Once you're outside I'll give you further instructions.
You'll find the tools and equipment that opens to space."
Anti waddled away. Huge, but she wasn't any bigger than her
determination.
Once she was gone Jordan looked down at his legless body. "I hate
to do this but we've got to be realistic about it."
"It's the only way we've got a chance," answered Docchi. "Anti's the
only one who can do the job. And I think she'll survive."
Jordan adjusted a dial. "Cameron had better hope she will," he
muttered. "He'll join her if she doesn't."
Docchi glanced hastily at the screen. Anti was hanging free in space,
wrapped and strapped in strips torn from the supposedly useless
spacesuits. And she was also enclosed in more flesh than any human
had borne. The helmet was taped jauntily to her head and the
oxygen cylinder was fastened to her back. And she lived.
"How is she?" he asked anxiously, unaware that the microphone was
open.
"Fine," came the reply, faint and reedy. "The air's thin but it's pure."
"Cold?"
"Don't know. Don't feel it yet. Anyway it can't be worse than the
acid. What do I do?"
Jordan gave her directions while the others watched. It required
considerable effort to find the tools and examine the tubes for
defectives, to loosen the tubes in the sockets and pull them out,
sending them spinning into space. It was still more difficult to
replace them, though there was no gravity and Anti was held firmly
to the hull by magnetics.
Anti had never been a technician of any kind. Cameron was sure of
it. She was ignorant of the commonest terms, the simplest tool. She
shouldn't have been able to do it. And yet she managed nicely,
though she didn't know how. The explanation must be that she did
know, that somewhere in her remote past, of which he was totally
uninformed, she had had training which prepared her for this. Such
contradiction was ridiculous. But there was rhythm to her motions,
this giant shapeless creature whose bones would break with weight
if she tried to stand at half gravity.
The whale plowing through the deeps and waves has the attraction
of beauty. It can't be otherwise for any animal in an environment
which it is suited to live in. And the human race had produced,
haphazardly, one unlikely person to whom interplanetary space was
not alien. Anti was at last in her element.
"Now," said Jordan, keeping tension out of his voice though it was
trembling in his hand. "Go back to the outside tool compartment.
You'll find a lever near it. Pull. This will set the combustion cap in
place."
"Done," said Anti when it was.
"That's all. Come in now."
She went slowly over the hull to the cargo ramp and while she did
Jordan reeled in the viewers. The lock was no sooner closed to the
outside and the air hissing into the intermediate space than he was
there, waiting for the inner lock to open.
"Are you all right?" he asked gruffly.
She flipped back the helmet. There was frost on her eyebrows and
her face was bright and red. "Why shouldn't I be? My hands aren't
cold." She stripped off the heated gloves and waggled her fingers.
"I can't believe it," protested Cameron with more vehemence than
he intended. "You should be frozen through."
"Why?" said Anti with gurgling laughter. "It's merely a matter of
insulation and I have plenty of that. More than I want."
Shaking his head Cameron turned to Docchi. "When I was a boy I
saw a film of a dancer. She did a ballet. I think it was called: Free
Space-Free Life. Something like that. I can't say why but it came to
my mind when Anti was out there. I hadn't thought of it in years."
He rubbed his hand over his forehead. "It fascinated me when I first
saw it. I went to it again and again. When I grew older I found out a
tragic thing had happened to the dancer. She was on a tour of Venus
when the ship she was in was forced down. Searching parties were
sent out but they didn't find anyone except her. And she had been
struggling over a fungus plain for a week. You know what that
meant. The great ballerina was a living spore culture medium."
"Shut up," said Jordan. "Shut up."
Cameron was engrossed in the remembrance and didn't seem to
hear. "Naturally she died. I can't recall her name but I can't forget
the ballet. And that's funny because it reminded me of Anti out there
——"
"I told you to shut up!" Jordan exploded a fist in the doctor's face. If
there had been more behind the blow than shoulders and a
fragment of a body Cameron's jaw would have been broken. As it
was he floated through the air and crashed against the wall.
Angrily he got to his feet. "I gave my word I wouldn't cause trouble.
I thought the agreement worked both ways." He glanced
significantly at the weapon Jordan carried. "Better keep that around
all the time."
"I told you," said Jordan. "I told you more than once." After that he
ignored the doctor, thrusting the weapon securely into his garment.
He turned to Anti. "Very good," he said, his anger gone and his voice
courtly. "An excellent performance. One of your best, Antoinette."
"You should have seen me when I was good," said Anti. The frost
had melted from her eyebrows and was trickling down her cheek.
She left with Jordan.
Cameron remained behind. It was too bad about his ambition. He
knew now he was never going to be the spectacular success he'd
once envisioned—not after this escape from Handicap Haven. He'd
done all he could to prevent it but it wouldn't count with the
Medicouncil that he had good intentions. Still, he'd be able to
practice somewhere; doctors were always necessary. There were
worse fates—suppose he had to abandon medicine altogether?
Think of the ballerina he'd been talking about—she hadn't died as
the history tapes indicated. That much was window dressing; people
were supposed to believe it because it was preferable to the truth. It
would have been better for that woman if she hadn't lived on. By
now he had recalled her name: Antoinette.
And now it was Anti. He could have found it out by checking the
records—if Handicap Haven kept that particular information on file.
He was suddenly willing to bet that it wasn't there. He felt his jaw,
which ached throbbingly. He deserved it. He hadn't really been
convinced that they were people too.

"We'll stick to the regular lanes," decided Docchi. "I think we'll get
closer. They've no reason to suspect we're heading toward Earth.
Mars is more logical, or one of the moons of Jupiter, or another
asteroid. I'm sure they don't know what we're trying to do."
Jordan shifted uneasily. "I'm against it. They'll pick us up before we
have a chance to do anything."
"There's nothing to distinguish us from an ordinary Earth to Mars
rocket. We have a ship's registry on board. Use it. Take a ship that's
in our general class and thereafter we'll be that ship. If Traffic blips
us, and I don't think they will unless we try to land, we'll have a
recording ready. Something like this: 'ME 21 zip crackle 9 reporting.
Our communication is acting up. We can't hear you, Traffic.'
"That's quite believable in view of the age and condition of our ship.
Don't overdo the static effects but repeat it with suitable variations
and I don't think they'll bother us."
Shaking his head dubiously Jordan swung away toward the tiny
fabricating shop.
"You seem worried," said Anti as she came in.
Docchi didn't turn around. "Yeah."
"What's the matter, won't it work?"
"Sure. There are too many ships. They can't pick us out among so
many. Anyway they're not looking for us around Earth. They don't
really know why we took the rocket and escaped."
"Then why so much concern? Once we're near Earth we won't need
much time."
His face was taut and tired. "I thought so too, in the beginning.
Things have changed. The entire Solar Police force has been alerted
for us."
"So the Solar Police really want us? But I still don't understand why
that changes a thing."
"Look, Anti. We planned to bypass the Medicouncil and take our case
directly to the Solar Government. But if they want us as badly as the
radio indicates they're not going to be sympathetic. Not at all.
"And if they're not, if the Solar Government doesn't support us all
the way, we'll never get another chance. Hereafter there'll be guards
everywhere on the asteroid. They'll watch us even when we sleep."
"Well?" said Anti. She seemed trimmer and more vigorous. "We
considered it might turn out this way, didn't we? Let's take the last
step first."
Docchi raised his head. "Go to the ultimate authority? The Solar
Government won't like it."
"They won't, but there's nothing they can do about it."
"Don't be sure. They can shoot us down. When we stole the ship we
automatically became criminals."
"I know, but they'll be careful, especially after we make contact.
How would it look if we were blown to bits in front of their eyes, in a
billion homes?"
Docchi chuckled grimly. "Very shrewd. All right, they'll be careful. But
is it worth it to us?"
"It is to me."
"Then it is to me," said Docchi. "I suggest we start getting ready."
Anti scrutinized him carefully. "Maybe we ought to fix you up."
"With fake arms and a cosmetikit? No. They'll have to take us as we
are, unpretty, even repulsive."
"That's a better idea. I hadn't thought of the sympathy angle."
"Not sympathy—reality. It means too much to us. I don't want them
to approve of us as handsome unfortunates and then have them
change their minds when they discover what we're really like."
Sitting in silence, Docchi watched her go. She at least would benefit.
Dr. Cameron apparently hadn't noticed that the exposure to extreme
cold had done more to inhibit her unceasing growth than the acid
bath. She probably would never get back to her former size but
some day, if the cold treatment were properly investigated, she
might be able to stand at normal gravity. For her there was hope.
The rest of them had to keep on pretending that there was.
He examined the telecom. They were getting closer. No longer a
point of light, Earth was a perceptible disc. He could see the outline
of oceans, the shapes of land and the shadows of mountains, the
flat ripple where prairies and plains were; he could imagine people.
This was home—once.
Jordan came in. "The radio tape is rigged up. I haven't had to use it
yet. But we have a friend trailing along behind us, an official friend."
"Has he blipped at us?"
"When I left he hadn't. He keeps hanging on."
"Is he overtaking us?"
"He'd like to."
"Don't let him."
"With this bag of bolts?"
"Shake it apart if you have to," said Docchi impatiently. "How soon
can you slide into a broadcast orbit?"
Jordan furrowed his forehead. "I didn't think we'd planned on that
this time. It was supposed to be our last resort."
"Anti and I have talked it over. We agree that this is our last chance.
Now's the time to speak up if you've got any objections."
"I've been listening to the police calls," said Jordan thoughtfully. "No,
I guess I haven't got any objection. Not with a heavy cruiser behind
us. None at all."

They came together in the control compartment. "I don't want a


focus exclusively on me," Docchi was saving. "Nor on Nona either,
though I know she's most acceptable. To a world of perfect and
beautiful people we may look strange but they must see us as we
are. We have to avoid the family portrait effect."
"Samples," suggested Anti.
"In a sense we are, yes. A lot depends on whether they accept those
samples."
For the first time Cameron began to realize what they were
attempting. "Wait," he said urgently. "You're making a mistake.
You've got to listen to me."
"We've got to do this and we've got to do that," said Jordan. "I'm
getting tired of it. Can't you understand we're giving orders now?"
"That's right," said Docchi. "Jordan, see that Cameron stays out of
the transmitting angle and doesn't interrupt. We've come too far to
let him influence us."
"Sure. If he makes a sound I'll melt the teeth out of his mouth."
Jordan held the toaster against his side, away from the telecom but
aimed at Cameron.
The doctor wanted to break in but the weapon, though small, was
very real. And Jordan was ready to use it. That was the only
justification for his silence, that and the fact they'd learn anyway.
"Ready?" said Docchi.
"Flip the switch and we will be. I've hooked everything on. They
can't help themselves. They've got to listen."
The rocket slipped out of the approach lanes. It spun down, stem
tubes pulsing brightly, falling toward Earth in a tight trajectory.
Down, down; the familiar planet was very large.
"Citizens of the solar system, everyone on Earth," began Docchi.
"This is an unscheduled broadcast. We're using the emergency
bands because for us it is an emergency. I said we, and you want to
know who we are. Look at us. Accidentals—that's all we can be.
"We're not pretty. We know it. But there are other things more
important. Accomplishment, contribution to progress. And though it
may seem unlikely to you there are contributions we can make—if
we're permitted to do so.
"But shut away on a little asteroid we're denied our rights. All we
can do is exist in frustration and boredom, kept alive whether we
want to be or not. And yet we can help you as you've helped us—if
we're allowed to. You can't go to the stars yet, but we can. And
ultimately, through what we learn, you'll be able to.
"You've listened to experts who say it can't be done, that rockets are
too slow and that the crew would die of old age before they got
back. They're almost right, but accidentals are the exception.
Ordinary people would die but we won't. The Medicouncil has all the
facts—they know what we are—and still they refuse us."
At the side of the control compartment Cameron moved to protest.
Jordan glanced at him, imperceptibly waggling the weapon.
Cameron stopped, the words unspoken.
"Biocompensation," continued Docchi evenly as if nothing had
occurred. "Let me explain what it means in case information on it
has been suppressed. The principle of biocompensation has long
been a matter of conjecture. This is the first age in which medical
techniques are advanced enough to explore it. Every cell and
organism tends to survive as an individual and a species. Injure it
and it strives for survival according to the extent of damage. If it can
it will heal the wound and live on in its present state. Otherwise it
propagates almost immediately. You can verify this by forgetting to
water the lawn and watch how soon it goes to seed.
"Humans aren't plants, you say. And yet the principle applies.
Accidentals are people who have been maimed and mutilated almost
past belief. And our bodies have had the assistance of medical
science, real medical science. Everyone knows how, after certain
illnesses, immunity to that disease can be acquired. And more than
blood fractions are involved in the process. For us blood was
supplied as long as we needed it, machines did our breathing,
kidneys replaced, hearts furnished, glandular products in exact
minute quantities, nervous and muscular systems regenerated—and
our bodies responded. They had to respond or none of us would be
here today. And such was the extremity of the struggle—so close did
we come to it that we gained practical immunity to—death."
Sweat ran down Docchi's face. He longed for hands to wipe it away.
"Most accidentals are nearly immortal. Not quite of course; we may
die four or five hundred years from now. Meanwhile there is no
reason why we can't be explorers for you. Rockets are slow. You'd
die before you got to Alpha Centauri and back. We won't. Time
means nothing to us.
"Perhaps better faster rockets will be devised after we leave. You
may get there before we do. We don't mind. We will have tried to
repay you the best way we know how and that will satisfy us."
With an effort Docchi smiled. The instant he did so he felt it was a
mistake, one he couldn't call back. Even to himself it seemed more
like a snarl.
"You know where we're kept—that's more polite than saying
imprisoned. We don't call it Handicap Haven. Our name for it is:
Junkpile. And we're junkmen. Do you know how we feel?
"I don't know how you can persuade the Medicouncil to let us man
an expedition to the stars. We've appealed and appealed and they've
always turned us down. Now that we've let you know it's up to you.
Our future as humans is at stake. Settle it with your conscience.
When you go to sleep think of us out there on the junkpile."
He nudged the switch and sat down. His face was gray and his eyes
were rimmed and burning.
"I don't want to bother you," said Jordan. "What'll we do about
these?"
Docchi glanced at the telecom. The ships were uncomfortably close
and considerably more numerous than the last time he had looked.
"Take evasive action," he said wearily. "Swing close to Earth and use
the planet's gravity to give us a good fast sendoff. We can't let them
take us until people have a chance to make their feelings known."
"Now that you've finished I want to discuss it with you," said
Cameron. There was an odd tone to his voice.
"Later," said Docchi. "Save it. I'm going to sleep. Jordan, wake me if
anything happens. And remember you don't have to listen to this
fellow if you don't want to."
Jordan nodded contemptuously. "I know what he's like. He's got
nothing to say to me."
Nona, leaning against the panel, paid no attention to any of them.
She seemed to be listening to something nobody else could hear,
she, to whom sound had no meaning. Docchi's body sagged as he
went out. Her perpetual air of wondering search for something she
could never have was not new but it was no more bearable because
of that.
And while Docchi slept the race went on against a slowly changing
backdrop of stars and planets. Only the darkness remained the
same; it was immutable. The little flecks of light that edged nearer
hour after hour didn't seem cheerful to Jordan. His lips were fixed in
a thin hard line. His expression didn't alter. Presently, long after
Earth was far behind, he heard Docchi come in again.
"I've been thinking about it," said Cameron. "Nice speech."
"Yeah." Docchi glanced at the screen. The view didn't inspire
comment.
Cameron was standing at the threshold. "I may as well tell you," he
said reluctantly. "I tried to stop the broadcast as soon as I found out
what was going on. You wouldn't listen."
He came on into the control compartment. Nona was huddled in a
seat, her face blankly incurious. Anti was absent, replenishing the
acid for her robe. "Do you know why the Medicouncil refused to let
you go?"
"Get to the point."
"Damn it, I am," said Cameron, sweating. "The Centauri group
contains several planets, just how many we're not sure. From what
we know of cosmology there's a good chance intelligent life exists
there, probably not far behind us in technical development. Whoever
goes there will be our representatives to an alien race. What they
look like isn't important; it's their concern. But our ambassadors
have to meet certain minimum standards. It's an important occasion,
our future relations rest on. Damn it—don't you see our
ambassadors must at least appear to be human beings?"
"You're not telling us anything new. We know how you feel." Jordan
was rigid with disgust.
"You're wrong," said Cameron. "You're so wrong. I'm not speaking
for myself. I'm a doctor. The medicouncilors are doctors. We graft on
or regenerate legs and arms and eyes. The tools of our trade are
blood and bones and intestines. We know very well what people look
like from the inside. We're well aware of the thin borderline that
separates normal men and women from accidentals.
"Can't you still understand what I'm saying? They're perfect,
everybody's perfect. Too much so. They can't tolerate small
blemishes. More money is spent for research on acne than to
support the whole asteroid. They rush to us with wrinkles and
dandruff. Health, or the appearance of it, has become a fetish. You
may think the people you appealed to are sympathetic but what they
feel is something else."
"What are you driving at?" said Docchi in a low voice.
"Just this: if it were up to the Medicouncil you'd be on your way to
the Centauris. It isn't. The decision wasn't made by us. Actually it
came directly from the Solar Government. And the Solar Government
never acts contrary to public opinion."
Docchi turned away, his face wrinkled in distaste. "I didn't think you
had the nerve to stand there and say that."
"I didn't want to. But you've got to know the truth." Cameron
twisted his head uncomfortably. "You're not far from Earth. You can
still pick up the reaction to your broadcast. Try it and see."
Jordan looked at Docchi who nodded imperceptibly. "We may as
well," said Docchi. "It's settled now, one way or the other. Nothing
we can do will change it."
Jordan searched band after band, eagerly at first. His enthusiasm
died and still the reaction never varied. Private citizen or public
figure, man or woman, the indignation was concealed but
nevertheless firm and unmistakable. There was no doubt accidentals
were unfortunate but they were well taken care of. There was no
need to trade on deformity; the era of the freak show had passed
and it never would return.
"Turn it off," said Docchi at last.
Numbly Jordan complied.
"Now what?" he said.
"Why fight it?" said the doctor. "Go back to the asteroid. It'll be
forgotten."
"Not by us," said Docchi dully. "But there doesn't seem to be any
choice. It would have been better if we had tried to work through
the Medicouncil. We misjudged our allies."
"We knew you had," said Cameron. "We thought we'd let you go on
thinking as you did. It gave you something to hope for, allowed you
to feel you weren't alone. The trouble was that your discontent
carried you further than we thought it could."
"We did get somewhere," Docchi said. His lethargy seemed to lift
somewhat as he contemplated what they'd achieved. "And there's
no reason we have to stop. Jordan, contact the ships behind us. Tell
them we've got Cameron on board. A hostage. Play him up as their
man. Basically he's not bad. He's not against us as much as the rest
are."
Anti came into the compartment. Cheerfulness faded from her face.
"What's the matter?"
"Jordan'll tell you. I want to think."
Docchi closed his eyes and his mind to the whispered consultation of
Anti and Jordan, to the feeble ultimatum to the ships behind them.
The rocket lurched slightly though the vibration from the exhaust did
not change. There was no cause for alarm, the flight of a ship was
never completely steady. Minor disturbances no longer affected
Docchi.
When he had it straightened out in his mind he looked around. "If
we were properly fueled and provisioned I would be in favor of
heading for Alpha or Proxima. Maybe even Sirius. Distance doesn't
matter since we don't care whether we come back." It was plain he
wasn't expending much hope. "But we can't make it with the small
fuel reserve we have. If we can lose the ships behind us we may be
able to hide until we can steal fuel and food."
"What'll we do with doc?" said Jordan. He too was infected with
defeat.
"We'll have to raid an unguarded outpost, a small mining asteroid is
our best bet. We'll leave him there."
"Yeah," said Jordan listlessly. "A good idea, if we can run away from
our personal escort. Offhand I don't think we can. They hesitated
when I told them we had Cameron but they didn't drop back. Look."
He looked himself and, unbelievingly, looked again. He blinked
rapidly but the screen could report only what there was.
"They're gone," he said, his voice breaking with excitement.
Almost instantly Docchi was at his side. "No, they're still following
but they're very far behind." Even as he looked the pursuing ships
shrank visibly, steadily losing ground.
"What's the relative speed?" said Jordan. He looked at the dials,
tapped them, pounded on them, but the speed wouldn't change. If it
hadn't been confirmed by the screen he'd have said that the needles
were stuck or the instruments were completely unreliable.
"What did you do with the rockets?" demanded Docchi.
"That's a foolish question. What could I do? We were already at top
speed for this piece of junk."
And there was no way to explain the astonishing thing that had
happened. They were all in the control compartment, Cameron, Anti,
Jordan and himself. Nona was there too, sitting huddled up, head
resting in her arms. There was no explanation at all, unless—Docchi
scanned all the instruments again. That was when he first noticed it.
Power was pouring into the gravity drive. The useless, or at least
long unused dial was indicating unheard of consumption. "The
gravity drive is working," Docchi said.
"Nonsense," said Anti. "I don't feel the weight."
"You don't and won't," said Docchi. "The gravity drive was installed
to propel the ship. When it was proved unsatisfactory for that
purpose it was converted, which was cheaper than removing it.
"The difference between the drive and ordinary gravity is slight but
important. An undirected general field produces weight effects inside
the ship. That's for passenger comfort. A directed field, outside it,
will drive it. You can have one or the other but not both."
"But I didn't turn on the drive," said Jordan in bewilderment. "It
wouldn't work for more than a few seconds if I did. That's been
proven."
"I'd agree with you except for one thing. It is working, has been
working and shows no sign of stopping." Docchi stared speculatively
at Nona. She was curled up but she wasn't resting. Her body was
too tense. "Get her attention," he said.
Jordan gently touched her shoulder. She opened her eyes but she
wasn't looking at them. On the panel the needle of a once useless
dial rose and fell.
"What's the matter with the poor dear?" asked Anti. "She's shaking."
"Let her alone," said Docchi. "Let her alone if you don't want to
return to the asteroid." No one moved. No one said anything.
Minutes passed and the ancient ship creaked and quivered and ran
away from the fastest rockets in the system.
"I think I can explain it," said Docchi at last, frowning because he
couldn't quite. There were things that still eluded him. "Part of the
gravity generating plant—in a sense the key component—is an
electronic computer, capable of making all the calculations and
juggling the proportion of power required to produce directed or
undirected gravity continuously. In other words a brain, a complex
mechanical intelligence. But it was an ignorant intelligence and it
couldn't see why it should perform ad infinitum a complicated and
meaningless routine. It couldn't see why and because it couldn't very
simply it refused to do so.
"It was something like Nona. She's deaf, can't speak, can't
communicate in any way. Like it she has a very high potential
intelligence and also, in the very same way, she's had difficulty
grasping the facts of her environment. Differently though, she does
have some contact with people and she has learned something. How
much she knows is uncertain but it's far beyond what psychologists
credit her with. They just can't measure her type of knowledge."
"Yeah," said Jordan dubiously. "I'll agree about Nona. But what is
she doing?"
"If there were two humans you'd call it telepathy," said Docchi. It
upset his concepts too. A machine was a machine—a tool to be
used. How could there ever be rapport? "One intelligence is
electronic, the other organic. You'll have to dream up your own term
because the only thing I can think of is extra sensory perception. It's
ridiculous but that's what it is."
Jordan smiled and flexed his arms. Under the shapeless garment
muscles rippled. "To me it makes sense," he said. "The power was
always there but they didn't know what to do with it." The smile
broadened. "It couldn't have fallen into better hands. We can use
the power, or rather Nona can."
"Power?" said Anti, rising majestically. "If you mean by that what it
sounds like, I don't care for it. All I want is just enough to take us to
Centauri."
"You'll get there," said Docchi. "A lot of things seem clearer now. In
the past why did the drive work so poorly the further out it got? I
don't think anyone investigated this aspect but if they had I'm sure
they'd have found that the efficiency was inversely proportional to
the square of the distance from the sun.
"It's what you'd expect from a deaf, blind, mass sensitive brain, the
gravity computer. It wouldn't be aware of the stars. To it the sun
would seem the center of the universe and it would no more leave
the system than our remote ancestors would think of stepping off
the edge of a flat world.
"And now that it knows differently the drive ought to work
anywhere. With Nona to direct it, even Sirius isn't far."
"What are you thinking about, doc?" said Jordan carelessly. "If I
were you I'd be figuring a way to get off the ship. Remember we're
going faster than man ever went before." He chuckled. "Unless, of
course, you like our company and don't want to leave."
"We've got to do some figuring ourselves," said Docchi. "There's no
use heading where there are no stars. We'd better determine our
destination."
"A good idea," said Jordan, hoisting himself up to the charts. He
busied himself with interminable calculations. Gradually his flying
fingers slowed and his head bent lower over the work. Finally he
stopped, his arms hanging slack.
"Got it?"
"Yeah," said Jordan. "There." Dully he punched the telecom selector
and a view took shape on the screen. In the center glimmered a tiny
world, a fragment of a long exploded planet. The end of their
journey was easily recognizable.
It was Handicap Haven.
"But why are we going there?" asked Anti. She looked at Docchi in
amazement.
"We're not going voluntarily," he said, his voice flat and spent.
"That's where the Medicouncil wants us. We forgot about the
monitor system. When Nona activated the gravity drive it was
indicated at some central station. All the Medicouncil had to do was
take the control away from Nona."
"We thought we were running away from the ships," said Anti. "We
were, but only to beat them back to the junkpile."
"Yeah," said Docchi. "Nona doesn't know it yet."
"Well, it's over. We did our best. There's no use crying about it." Yet
she was. Anti passed by the girl, patting her gently. "It's all right,
darling. You tried to help us."
Jordan followed her from the compartment. Cameron remained,
coming over to Docchi. "Everything isn't lost," he said awkwardly.
"The rest of you are back where you started but at least Nona isn't."
"Do you think she'll benefit?" asked Docchi. "Someone will, but it
won't be Nona."
"You're wrong. Suddenly she's become important."
"So is a special experimental machine. Very valuable but totally
without rights or feelings. I don't imagine she'll like her new status."
Silence met silence. It was the doctor who turned away. "You're sick
with disappointment," he said thickly. "Irrational, you always are
when you glow. I thought we could talk over what was best for her
but I can see it's no use. I'll come back when you're calmer."
Docchi glared sightlessly after him. Cameron was the only normal
who was aware that it was Nona who controlled the gravity drive. All
the outside world realized was that it was in operation—that at last it
was working as originally intended. If they should dispose of
Cameron—
He shook his head. It wouldn't solve anything. He could fool them
for a while, pretend that he was responsible. But in the end they'd
find out. Nona wasn't capable of deception—and they'd be very
insistent with a discovery of this magnitude.
She looked up and smiled. She had a right to be happy. Until now
she had been alone as few people ever are. But the first contact had
been made and however unsatisfactory—what could the limited
electronic mind say?—in other circumstances it might have presaged
better days. She didn't know she was no less a captive than the
computer.
Abruptly he turned away. At the telecom he stopped and
methodically kicked it apart, smashing delicate tubes into powder.
Before he left he also demolished the emergency radio. The ship was
firmly in the grip of the monitor and it would take them back. There
was nothing they had to do. All that remained for him was to protect
Nona as long as he could. The Medicouncil would start prying into
her mind soon enough. He hoped they'd find what they were after
without too much effort. For her sake he hoped they would.
6
Perfectly synchronized to their speed the outer shell of the dome
opened, closing behind them before they reached the inner shell. It
too gaped wide to swallow them, snapping shut like a quickly sprung
trap. Jordan set the controls in neutral and dropped his hands,
muttering to himself. They glided to a stop over the landing pit,
thereafter settling slowly. Homecoming.
"Cheer up," said Cameron jauntily. "You're not prisoners."
Nona alone seemed not to mind. Docchi hadn't said anything for
hours and the light was gone from his face. Anti wasn't with them;
she was back floating in the acid tank. The reentry into the gravity
field of the asteroid made it necessary.
The ship scraped gently; they were down. Jordan mechanically
touched a lever, flicked a switch. Passenger and freight locks swung
open. "Let's go," said Cameron. "I imagine there's a reception
committee for us."
Even he was surprised at what was waiting. The little rocket dome
held more ships than normally came in a year. The precise confusion
of military discipline was everywhere. Armed guards lined either side
of the landing ramp and more platoons were in the distance. It was
almost amusing to see how dangerous the Medicouncil considered
them.
Near the end of the ramp a large telecom had been set up. If size
indicated anything someone thought this was an important occasion.
From the screen, larger than life, Medicouncilor Thorton looked out
approvingly.
"A good job, Dr. Cameron," said the medicouncilor as the procession
from the ship halted. "We were quite surprised at the escape of our
accidentals and your disappearance which coincided with it. From
what we were able to piece together, you followed them deliberately.
A splendid example of quick thinking, doctor. You deserve
recognition."
"I thought it was my fault for letting them get so far. I had to try to
stop them."
"No doubt it was. But you atoned, you atoned. I'm sorry I can't be
there in person to congratulate you but I'll arrive soon." The
medicouncilor paused discreetly. "At first the publicity was bad, very
bad. We thought it unwise to try to conceal it. Of course the
broadcast made it impossible to hide anything. Fortunately the
discovery of the gravity drive came along at just the right time.
When we announced it opinion began swinging in our direction. I
don't mind telling you the net effect is now in our favor."
"I hoped it would be," said Cameron. "I don't want them to be hurt.
They're all vulnerable, Nona especially, because of what she is. I've
thought quite a bit about how she should be approached——"
"I'm sure you have." The medicouncilor smiled faintly. "Don't let your
emotions run away with you. In due time we'll discuss her. For the
present see that she and the other accidentals are returned to their
usual places. Bring Docchi to your office at once. He's to be
questioned privately."
It was a strange request and mentally Cameron retreated. "Wait. Are
you sure you want Docchi? He's the engineer but——"
"No objections, doctor," said Thorton sternly. "Important people are
waiting. Don't spoil their good opinion of you." The telecom snapped
into darkness.
"I think you heard what he said, Dr. Cameron." The officer at his
side was very polite, perhaps because it emphasized the three big
planets on his tunic.
"I heard," said Cameron irritably. "I don't want to argue with
authority but since I'm in charge of this place I demand that you
furnish a guard for this girl.
"So you're in charge?" drawled the officer. "You know I've got a
funny feeling I'm commander here. My orders said I was to replace
you until further notice. I haven't got that notice." He looked around
at his men and crooked a finger. "Lieutenant, see that the little fella
—Jordan, I think his name is—gets a lift back to the main dome. And
you can walk the pretty lady to her room, or whatever it is she lives
in. Don't get too personal though unless she encourages it." He
smiled condescendingly at Cameron. "Anything else I can do to
oblige a fellow commander?"
Cameron glanced at the guards. They were everywhere he looked,
smartly uniformed, alert. There was no indication of amusement in
the expressions of those near enough to have heard the
conversation. They were well disciplined. "Nothing else, General," he
said stonily. "Keep her in sight. You're responsible."
"So I am," remarked the officer pleasantly, winking at the lieutenant.
"Let's go."

Medicouncilor Thorton was waiting impatiently on the screen in


Cameron's office. The attitude suited him well, as if he'd tried many
and found slightly concealed discourtesy best for the personality of
the busy executive. "We'll arrive in about two hours," he said
immediately. "By this I mean a number of top governmental officials,
scientists, and some of our leading industrialists. Their time is
valuable so let's get on with this gravity business."
He caught sight of the commander. "General Judd, this is a technical
matter. I don't think you'll be interested."
"Very well, sir. I'll stand guard outside."
The medicouncilor was silent until the door closed. "Sit down,
Docchi," he said with unexpected solicitude, pausing to note the
effect. "I can sympathize with you. Everything within your reach—
and then to return here. Well, I can understand how you feel. But
since you did come back I think we can arrange to do things for
you."
Docchi stared at the screen. A spot of light pulsed in his cheek and
then flared rapidly over his face. "You probably will," he said
casually. "But what about theft charges? We stole a ship."
"A formality," declared the medicouncilor with earnest simplicity.
"With a thing like the discovery, or rediscovery, of the gravity drive,
no one's going to worry about an obsolete ship. How else could you
test your theories except by trying them out in actual flight?"
The medicouncilor was dulcet, coaxing. "I don't want to mislead you.
Medically we can't do any more for you than we have. However
you'll find yourself the center of a more adequate social life. Friends,
work, whatever you want. In return for this naturally we'll expect
your cooperation."
"Wait," said Cameron, walking to the screen and standing squarely
in front of it. "I don't think you realize Docchi's part——"
"Don't interrupt," glowered Thorton. "I want to reach an agreement
at once. It will look very good for us if we can show these famous
people how well we work with our patients. Now, Docchi, how much
of the drive can you have on paper by the time we land?"
"He can't have anything," Cameron started shouting. "I tried to tell
you—he doesn't know——"
"Look out," cried Thorton too late.
Cameron's knees buckled and he clutched his legs in pain. Again
Docchi kicked out and the doctor fell down. Docchi aimed another
savage blow with his foot that grazed the back of Cameron's head.
Blood trickled from his mouth and he stopped trying to get up.
"Docchi," screeched Thorton, but there was no answer.
Docchi crashed through the door. The commander was lounging
against the wall, looking around vacantly. Head down Docchi
plunged into him. The toaster fell from his belt to the floor. With
scarcely a pause Docchi stamped on it and continued running.
The commander got up, retrieving the weapon. He aimed it at the
retreating figure and would have triggered it except that it didn't feel
right in his hand. He lowered it and quickly examined the damaged
mechanism. Sweating, he slipped it gingerly into a tunic pocket.
Muffled shouts were coming from Cameron's office, growing in
vehemence. The general broke in.
The medicouncilor glared at him from the screen. "I see that you let
him get away."
The disheveled officer straightened his uniform. "I'm sorry, sir. I
didn't think he had that much life in him. I'll alert the guards
immediately."
"Never mind now. Revive that man."
The general wasn't accustomed to resuscitation; saving lives was out
of his line. Nevertheless in a few minutes Cameron was conscious,
though somewhat dazed.
"Now, doctor, who does know something about the gravity drive if it
isn't Docchi?"
Cameron shook his head groggily. "It was an easy mistake," he said.
"Cut off from communication with us the drive began to work. How,
why, who did it? Mostly who. Not me, I'm a doctor, not a physicist.
Nor Jordan; he's at best a mechanic. Therefore it had to be Docchi
because he's an engineer." He stopped to wipe the blood from his
cheek.
"For God's sake tell me," said Thorton. "It couldn't be——"
"No," said Cameron with quiet satisfaction. "It wasn't Anti either. The
last person you'd think of. The little deaf and dumb girl the
psychologists wouldn't bother with."
"Nona?" said Thorton incredulously.
"I told you," said Cameron and proceeded to tell him more, filling in
the details.
"I see. We overlooked that possibility," said the medicouncilor
gravely. "Not the mechanical genius of an engineer. Instead the
strange telepathic sense of a girl. That puts the problem in a
different light."
"It's not so difficult though." Cameron rubbed the lump on the back
of his head. The hair was bristling, clotted with blood. "She can't tell
us how she does it. We'll have to find out by experiment, but it won't
involve any danger. The monitor can always control the drive."
The medicouncilor laughed shakily, teetering backward. "The
monitor is worth exactly nothing. We tried it. For a microsecond it
seemed to take over as it always has on other units—but this gravity
generator slipped away. We thought Docchi found a way to
disengage the control circuit."
"But it wasn't Docchi who told the computer how to do it."
"We figured it out when we thought it was Docchi," growled the
medicouncilor wearily. "He was sensible, that's all. It was the only
reasonable thing a man could do, come back and take advantage of
his discovery." He shook his head in perplexed disgust. "Why the girl
returned is beyond me."
"Do you think——" said Cameron and then wished he'd left it unsaid.
"Yes, by God, I do think." The medicouncilor's fist crashed down.
"Docchi knows why. He found out in this room and we told him. As
soon as he knew he escaped."
Panic slipped into Thorton's face and then was gone, covered over
almost at once by long habits of sudden decisions. "She could have
taken the ship anywhere she wanted and we couldn't stop her. Since
she's here voluntarily it's obvious what she wants—the asteroid."
The medicouncilor tried to shove himself out of the screen. "Don't
you ever think, General? There's no real difference between gravity
generators except size and power. What she did on the ship she can
do as easily here."
"Don't worry," said the startled officer. "I'll get her. I'll find the girl
and Docchi too."
"Never mind him," choked the medicouncilor. "I don't care how you
do it. Take Nona at once, without delay."
The time had passed for that command. The great dome overhead
trembled and creaked in countless joints. But the structure held
though unexpected stresses were imposed on it. And the tiny world
shivered, groaning and grumbling at the orbit it had lain too long in.
Already that was changing—the asteroid began to move.
7
Vague shapes were stirring. They walked if they could, crawled if
they couldn't—fantastic and near-fantastic creatures were coming to
the assembly. Large or tiny, on their own legs or borrowed ones they
arrived, with or without arms, faces. The news had spread fast, by
voice or written message, sign language, lip reading, all the
conceivable ways that humans communicate, not the least of which
was the vague intuition that something was going on that the person
should know about. The people on Handicap Haven sensed the
emergency.
"Remember it will be hours or perhaps days before we're safe," said
Docchi. His voice was hoarse but he hadn't noticed it yet. "It's up to
us to see that Nona has all the time she needs."
"Where is she hiding?" asked someone in the crowd.
"I don't know. I wouldn't tell you if I did. They might pry it out of
you. Right now our sole job is to keep them from finding her."
"How?" demanded someone else near the front. "Do you expect us
to fight the guards?"
"Not directly," said Docchi. "We have no weapons for that, no
armament. Many of us have no arms in another sense. All we can do
is to obstruct their search. Unless someone can think of something
better, this is what I plan:
"I want all the men, older women and the younger ones who aren't
suitable for reasons I'll explain later. The guards won't be here for
half an hour—it will take that long to get them together and give
them orders. When they do come the first group will attempt to
interfere in every possible way with their search.
"How you do it I'll leave to your imagination. Appeal to their
sympathy as long as they have any. Put yourself in dangerous
situations. They have ethics and at first they'll be inclined to help
you. When they do, try to steal their weapons. Avoid physical
violence as much as you can. We don't want to force them into
retaliation—they'll be so much better at it. Make the most of this
phase of their behavior. It won't last long."
Docchi paused to look over the crowd. "Each of you will have to
decide for himself when to drop passive resistance and start the real
battle. Again, you may be able to think of more things than I can tell
you but here are some suggestions. Try to disrupt the light, scanning
and ventilation systems. They'll be forced to keep them in repair.
Perhaps they'll even attempt to guard all the strategic points. So
much the better for us—there'll be fewer guards to contend with."
"What about me?" called a woman from far in back. "What can I
do?"
"You're in for a rough time," Docchi promised. "Is Jeriann here?"
Jeriann elbowed her way through the crowd to his side. Docchi
glanced at her. He'd seen her many times but never so close. It was
hard to believe that she should be here with the rest of them.
"Jeriann," said Docchi to the accidentals, "is a normal pretty woman
—outwardly. However she has no trace of a digestive system. The
maximum time she can go without food and fluid absorption is ten
hours. That's why she's with us and not on Earth."
Docchi scanned the group. "I'm looking for a miracle. Is there a
cosmetechnician who thinks she can perform one? Bring your kit."
A legless woman propelled herself forward. Docchi conferred at
length with her. At first she was startled, reluctant to try but after
persuasion she consented. Under her deft fingers Jeriann was
transformed. When she turned around and faced the crowd she was
no longer herself—she was Nona.
"She can get away with the disguise longer and therefore she'll be
the first Nona they find," explained Docchi. "I think—hope—that
they'll call off the search for a few hours after they take her.
Eventually they'll find out she isn't Nona when they can't get her to
stop the drive. Fingerprints or x-rays would reveal it at once but
they'll be so sure they have her that it won't occur to them. Nona is
impossible to question as you know and Jeriann will give as good an
imitation as she can.
"As soon as they discover that the girl they have is Jeriann they
won't bother to be polite. Guards will like the idea of finding
attractive girls they can manhandle in the line of duty especially if
they think it will help them find Nona. It won't, but I think they'll get
too enthusiastic and that in itself will hold up the search."
No one moved. The women in the crowd were still, looking at each
other in silent apprehension. Jordan started them. He twisted his
head, grimacing. "Let's get busy," he said somberly.
"Wait," said Docchi. "I have one Nona. I need more volunteers, at
least fifty. It doesn't matter whether the person is physically sound
or not, we'll raid the lab for plastic tissue. If you're about her size
and can walk and have at least one arm come forward."
And slowly, singly and by twos and threes, they came to the
platform. There were few indeed who wouldn't require liberal use of
camouflage. It was primarily on these women their hopes rested.
The other group followed Jordan out, looking at Docchi for some
sign. When he gave them none they hurried on determinedly. He
could depend on them. The sum total of their ingenuity would
produce some results.
Mass production of an individual. Not perfect in every instance—
good enough to pass in most. Docchi watched critically, suggesting
occasional touches that improved the resemblance. "She can't speak
or hear," he reminded the volunteers. "Remember it at all times no
matter what they do. Don't scream for help, we won't be able to.
Hide in difficult places. After Jeriann is taken and the search called
off and then resumed, let yourselves be found, one at a time. We
can't communicate with you and so you'll just have to guess when
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

textbookfull.com

You might also like