Instant Download (Ebook) Simplified JavaScript for Very Important Programmers : The Fast Track to Mastering Essential JavaScript Concepts by Ebenezer Don ISBN 9798378081837, 8378081834, B0BW38DCB1 PDF All Chapters
Instant Download (Ebook) Simplified JavaScript for Very Important Programmers : The Fast Track to Mastering Essential JavaScript Concepts by Ebenezer Don ISBN 9798378081837, 8378081834, B0BW38DCB1 PDF All Chapters
com
OR CLICK HERE
DOWLOAD EBOOK
ebooknice.com
ebooknice.com
https://ebooknice.com/product/javascript-for-programmers-2016688
ebooknice.com
ebooknice.com
(Ebook) JavaScript: Learn JavaScript in 24 Hours or Less -
A Beginner’s Guide To Learning JavaScript Programming Now
(JavaScript, JavaScript Programming). by Robert Dwight.
ISBN B01HDPSYKW
https://ebooknice.com/product/javascript-learn-javascript-in-24-hours-
or-less-a-beginners-guide-to-learning-javascript-programming-now-
javascript-javascript-programming-55923064
ebooknice.com
https://ebooknice.com/product/git-prodigy-mastering-version-control-
with-git-and-github-52362654
ebooknice.com
ebooknice.com
https://ebooknice.com/product/mastering-the-internet-xhtml-and-
javascript-22041750
ebooknice.com
https://ebooknice.com/product/mastering-javascript-design-
patterns-6724550
ebooknice.com
Simplified JavaScript for Very
Important Programmers
The Fast Track to Mastering Essential
JavaScript Concepts
Ebenezer Don
This book is for sale at http://leanpub.com/vip-javascript
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Variables in JavaScript . . . . . . . . . . . . . . . . . . . . . 18
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Variable declaration and assignment . . . . . . . . . . . . 20
Variable naming rules and conventions . . . . . . . . . . 22
Arithmetic operators . . . . . . . . . . . . . . . . . . . . . 26
The Concatenation operator . . . . . . . . . . . . . . . . . 28
Assignment operators . . . . . . . . . . . . . . . . . . . . . 29
Comparison operators . . . . . . . . . . . . . . . . . . . . 30
Logical operators . . . . . . . . . . . . . . . . . . . . . . . 31
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
How to define functions in JavaScript . . . . . . . . . . . 33
The return keyword . . . . . . . . . . . . . . . . . . . . . . 34
Function Parameters vs Arguments . . . . . . . . . . . . . 36
More on the return statement . . . . . . . . . . . . . . . . 36
Anonymous functions . . . . . . . . . . . . . . . . . . . . 37
Multi-line return statements . . . . . . . . . . . . . . . . . 39
Arrow Functions . . . . . . . . . . . . . . . . . . . . . . . 40
Functions best practices . . . . . . . . . . . . . . . . . . . 41
JavaScript String Methods . . . . . . . . . . . . . . . . . . 42
JS Math functions . . . . . . . . . . . . . . . . . . . . . . . 44
Arrays . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Declaring and Initializing Arrays . . . . . . . . . . . . . . 48
Accessing and modifying Array Elements . . . . . . . . . 49
Array Length . . . . . . . . . . . . . . . . . . . . . . . . . 50
Array Methods . . . . . . . . . . . . . . . . . . . . . . . . 51
JavaScript Objects . . . . . . . . . . . . . . . . . . . . . . . . 76
Rules and Guidelines for creating objects . . . . . . . . . 77
Adding, modifying and Removing Properties . . . . . . . 82
Object.prototype . . . . . . . . . . . . . . . . . . . . . . . . 85
Object methods . . . . . . . . . . . . . . . . . . . . . . . . 87
Object destructuring . . . . . . . . . . . . . . . . . . . . . 90
CONTENTS
Conditional Statements . . . . . . . . . . . . . . . . . . . . . 94
Else-if statements in JavaScript . . . . . . . . . . . . . . . 94
Nested if statements . . . . . . . . . . . . . . . . . . . . . . 97
The Switch statement . . . . . . . . . . . . . . . . . . . . . 100
The ternary operator . . . . . . . . . . . . . . . . . . . . . 106
Loops . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
The for Loop . . . . . . . . . . . . . . . . . . . . . . . . . . 109
The for...in loop . . . . . . . . . . . . . . . . . . . . . . . 113
The for...of loop . . . . . . . . . . . . . . . . . . . . . . . 115
The while Loop . . . . . . . . . . . . . . . . . . . . . . . . 117
The do...while Loop . . . . . . . . . . . . . . . . . . . . . 119
History of JavaScript
JavaScript was created by Brendan Eich in 1995 and was first
introduced with the release of Netscape Navigator 2.0, a popular
web browser at the time. JavaScript was initially called Mocha but
later renamed to LiveScript and then to JavaScript in an attempt
to take advantage of the buzz surrounding the Java programming
language.
JavaScript quickly gained popularity among web developers and be-
came supported by other major web browsers like Internet Explorer
and Safari. In 1996, JavaScript was standardized by the European
What is JavaScript and How Does it Work? 5
While HTML and CSS are important for defining the content and
appearance of a webpage, without JavaScript, it’s difficult to add
interactivity to your webpage that’ll make users love it. JavaScript
allows developers to build more sophisticated and engaging user
experiences, and it is a critical component of modern web develop-
ment.
What is JavaScript and How Does it Work? 6
Server-side programming
Game development
You can also use JavaScript to build browser-based games with tools
like Phaser and Babylon.js. These tools allow you to create 2D and
3D games that can be played in a web browser.
What is JavaScript and How Does it Work? 7
Data visualization
Robotics
You can use JavaScript to control and program robots using plat-
forms like NodeBots and Johnny-Five.
Machine learning
To run your JavaScript code, press the Enter key on your keyboard.
This will print the message “My name is Ebenezer Don” and
How to write and run JavaScript code 9
Syntax
Here are some basic rules for writing and structuring JavaScript
code:
There are some more rules that won’t be easy for you to understand
now, so I’ll show them to you as we progress.
Data Types
In JavaScript, there are several data types that are used to represent
different types of information, like numbers, text, or true/false val-
ues. The most basic data types are numbers, strings, and Booleans.
A collection of multiple values with the same or different data types
is called a data structure.
JavaScript is a dynamically-typed language, which means that
the type of a value is determined while the program is running
and can change during the program. This is different from other
programming languages where you have to set the type of a value
when creating, and can’t change it later. These other languages are
called “statically-typed”.
There are several basic data types in JavaScript, including:
Numbers
Strings
In JavaScript, a string is a group of characters that is used to store
text. Strings are commonly used to store words and sentences. To
write a string, you have to wrap it in either single quotes (‘This
is a string’) or double quotes (“This is also a string”). Both types
of quotes can be used to write strings, as long as they are used
consistently. So, if you start writing a string with single quotes, you
must end it with single quotes.
A string can be a single word, sentence or multiple paragraphs, and
It can contain any combination of letters, numbers and spaces.
The text “My name is Ebenezer Don” in the console.log() state-
ment we used earlier is also a string. Remember to always use your
name wherever you see “Ebenezer Don”.
Let’s print the string “Hello World” to the console, using both single
quotes and double quotes:
JavaScript syntax and Data types 13
Now, try using the tyepof() method to find out the type of “Hello
World”. Remember to pay close attention to the casing of keywords.
For example, there’s no uppercase letter in the typeof() method.
The string is an important data type in JavaScript. You can use it to
represent text-based data like names, messages or addresses.
Booleans
Booleans represent true or false values. They are often used to make
comparisons and to determine whether a set of instructions should
be executed. When you run the code tyepof(true) in your browser
console, you should get the response, ‘boolean’.
To make value comparisons in JavaScript, you can use the symbols;
> (greater than), < (less than), or === (is the same as).
Now, let’s see if the strings “Hey” and ‘hey’ are the same in
JavaScript. Run the following line of code in your browser console:
Running the above code should return false, and that’s because
strings are case-sensitive in JavaScript.
Booleans are an important data type in JavaScript, as they allow
you to represent logical values, make comparisons and run code
conditionally.
Comments in JavaScript
In JavaScript, comments are pieces of text within the code that
are ignored when the code is executed. They are useful for adding
JavaScript syntax and Data types 14
Single-line comments
Multi-line comments
1 /*
2 This is a
3 multi-line comment
4 */
It’s a good practice to make your code readable enough that you
don’t need to add comments to explain what it does. However,
comments are useful when you want to explain why you did
something a certain way, or when you believe that your code might
be confusing to someone else or even your future self. Overuse of
comments can make your code cluttered and difficult to read, so
it’s important to strike a balance between writing readable code
and adding comments where necessary.
JavaScript syntax and Data types 15
The If Statement
An if statement enables you to run a block of code if a specific
condition is true. This is the basic syntax for an if statement:
1 if (condition) {
2 // code to run if condition is true
3 }
For instance, running the following code should return the string
“7 is greater than 5”:
1 if (7 > 5) {
2 console.log('7 is greater than 5')
3 }
1 if (7 < 5) {
2 console.log('7 is less than 5')
3 }
1 if (condition) {
2 // code to run if condition is true
3 } else {
4 // code to run if condition is false
5 }
1 if (7 < 5) {
2 console.log('7 is less than 5')
3 } else {
4 console.log('The condition is false')
5 }
Since 7 is not less than 5, running the above code should return the
string “The condition is false”.
Conditional statements are an essential tool for creating programs
that can adapt to different circumstances and make decisions based
on the data they receive. We’ll cover more complex conditional
statements and other ways we can write them as we progress.
Variables in JavaScript
Introduction
It’s not easy to write JavaScript code without using variables. So
far, we’ve done an excellent job of avoiding them, but it’s time you
learned about one of the most important concepts in programming.
A variable is a named location for storing data in the computer’s
memory. In simple words, it’s a container in which we can store
all kinds of data, like numbers, text, pieces of code, and even other
variables. So, think of a variable as a box with a label on it. The label
is the variable’s name, and the content of the box is the variable’s
value.
Here’s an example of a variable in JavaScript:
1 console.log(myName)
This will print the value of the variable myName to the console.
We can also reassign a variable’s value by using the assignment
operator (=). So if we want to change the value of the variable
myName to “Jane Butters,” we could do so by writing this line of code:
Now, if you rerun the console.log statement, you’ll get the string
“Jane Butters” printed on the console.
Variables in JavaScript 20
1 if (true) {
2 let message = 'JavaScript is awesome!'
3 }
4
5 console.log(message)
Running this code will return the string value “Jane” to the console.
This is because the name variable is global and is accessible from
anywhere in your code.
1 if (true) {
2 var message = 'JavaScript is awesome!'
3 }
4
5 console.log(message)
The above code will not return any errors because the message
variable is global. This means that it is accessible from anywhere
in the code, including outside the block of code in which it was
declared.
It’s important to be careful when using global variables. Since they
can be accessed from anywhere in your code, global variables can
cause problems. For example, if you declare a global variable with
the same name as a local variable in your code, the global variable
will overwrite the local variable; this can lead to unexpected results
and confusion in your code.
Variables in JavaScript 22
1 const age = 21
1 age = 22
2
3 // Uncaught TypeError: Assignment to constant variable.
• Arithmetic operators
• String operators
• Assignment operators
• Comparison operators
• Logical operators
Arithmetic operators
We use arithmetic operators to perform mathematical calculations
like addition (+), subtraction (-), multiplication (*), and division (/).
Here are examples you can try in the console:
1 console.log(10 + 2) // Output: 12
2 console.log(10 - 2) // Output: 8
3 console.log(10 * 2) // Output: 20
4 console.log(10 / 2) // Output: 5
1 let firstValue = 3
2 console.log(++value) // Output: 4
When placed after the operand, they are called postfix operators;
the operation is applied to the variable after the current value is
returned. Here’s an example:
1 let secondValue = 5
2 console.log(value++) // Output: 5
3 console.log(value) // Output: 6
Notice that we have to log the variable separately to get its new
value. This is because when you use the postfix operator, the value
is returned first, and then the operation is applied.
It’s also important to note that the increment and decrement
operators reassign new values to variables, so you can only do this
with variables you declare using the let keyword. If you try to use
these operators on a variable you declare with the const keyword,
you’ll get an error. Let’s give it a try. Remember always to run these
examples yourself to see the results:
1 const thirdValue = 7
2 console.log(++value)
3 // Uncaught ReferenceError: value is not defined
There are two other arithmetic operators that you can use in
JavaScript: the remainder operator (%) and the exponentiation
operator (**).
Basic JavaScript operators 28
Assignment operators
We use assignment operators to assign a value to a variable. You’ve
already seen the assignment operator (=) in action. There are also
compound assignment operators in JavaScript, which include: +=,
-=, *=, /=, and %=. These compound operators perform an operation
with a variable and an operand and then assign the result to the
variable. For example, if you have a variable named “age” with a
value of 10, and you want to increment it by 5, you can use the +=
operator like this:
1 let age = 10
2 age += 5 // Output: 15
1 age = 10
2 age *= 5 // Output: 50
3 age /= 5 // Output: 10
4 age -= 5 // Output: 5
5 age %= 5 // Output: 0
Comparison operators
We use comparison operators to compare two values and return a
boolean value (true or false) based on the comparison result. Here
are the comparison operators and their meanings:
• ==: equal to
• != : not equal to
• > : greater than
• < : less than
• >= : greater than or equal to
• <= : less than or equal to
• === : strict equal to (compares both the value and the type of
the operands)
• !== : strict not equal to (compares both the value and the type
of the operands)
1 console.log(10 == 10)
2 // Output: true
3 console.log(10 == 5)
4 // Output: false
5 console.log(10 != 5)
6 // Output: true
7 console.log(10 > 5)
8 // Output: true
9 console.log(10 < 5)
10 // Output: false
11 console.log(10 >= 10)
12 // Output: true
13 console.log(10 >= 11)
14 // false: 10 is neither greater than nor equal to 11
15 console.log(10 <= 10)
Basic JavaScript operators 31
16 // true: 10 is equal to 10
17 console.log(10 <= 9)
18 // false: 10 is neither less than nor equal to 9
19 console.log(10 === 10)
20 // true: 10 is equal to 10 and they are both numbers
21 console.log(10 === '10')
22 // false: number 10 is not the same as string 10
23 console.log(10 !== 9)
24 // true: 10 is not equal to 9
25 console.log(10 !== '10')
26 // true: number 10 is not the same as string 10
Logical operators
In JavaScript, we use logical operators to perform logical operations
like AND (&&), OR (||), and NOT (!). Here are some examples:
The AND operator returns true if both operands are true, and false
if either operand is false. So if you run console.log(10 > 5 && 7
< 10) on your console, you’ll get true as the output because 10 is
greater than 5, and 7 is less than 10. But if you run console.log(10
Basic JavaScript operators 32
> 5 && 7 > 10) on your console, you’ll get false as the output
because 10 is greater than 5, but 7 is not less than 10. When using
the AND operator, both operands must be true for the result to be
true.
The OR operator returns true if any of the operands is true, and false
if both operands are false. So if you run console.log(10 > 5 || 7 >
10) on your console, you’ll get true as the output because one of the
operands is true (10 is greater than 5). If you run console.log(10 <
5 || 7 > 10) on your console, you’ll get false as the output because
both operands are false.
The NOT operator returns true if the operand is false, and false if
the operand is true. So you can read !true as “not true”, and !false
as “not false”.
Operators are an essential part of programming, and you’ll always
need them when writing code. Remember that you must practice a
lot to become a good JavaScript developer. So go over this chapter
a hundred times if you need to, and try using each of the operators
with different examples. You’ll get better at them with time.
Functions
In JavaScript, functions are a way to group code that can be reused
or executed as many times as needed in a program.
You’ve already used the console.log() method to display things in
your console, and the typeof() method to find the type of values.
In JavaScript, built-in functions are called methods.
The console.log() statement contains several lines of code you don’t
see, and this is what actually tells the JavaScript engine to display
the value you put in parenthesis on the console so that when
you run console.log('Hello World!'), the JavaScript engine will
display the text Hello World!
With JavaScript functions, you can run the same set of statements
from multiple places in a program without having to rewrite it each
time.
1 function multiplyByTwo(value) {
2 const result = value * 2
3 return result
4 }
Function parameters
1 function multiplyByTwo(value) {
2 if (isNaN(value)) {
3 return ' Value must be a number'
4 }
5
6 const result = value * 2
7 return result
8 }
1 multiplyByTwo()
1 console.log(multiplyByTwo(35))
Here’s what we’ll see on our console when we run the above code:
Functions 36
1 70
1 console.log(multiplyByTwo('this is a string'))
2 // output: Value must be a number
1 function multiplyByTwo(value) {
2 const result = value * 2
3 }
4
5 console.log(multiplyByTwo(35))
6 // output: undefined
1 function multiplyByTwo() {
2 const result = value * 2
3 return
4 }
5
6 console.log(multiplyByTwo(35))
7 // output: undefined
Anonymous functions
You’ve seen how to use function declarations to define named
functions. You can also use function declarations to define anony-
mous functions and Immediately Invoked Function Expressions
(IIFE).
Anonymous functions are functions that are without names;
hence, the word anonymous.
1 function () {
2 return alert("I'm a function, and I'm anonymous!")
3 }
1 ;(function () {
2 return alert("I'm a function, and I'm anonymous!")
3 })()
Function expression
Now, we can invoke (or call) our function the same way we invoked
multiplyByTwo(). Since our function has no parameter, there’ll be
no need to supply an argument.
1 alertUser()
Result:
Functions 39
1 function multiplyByFive(value) {
2 return
3 value * 5
4 }
5
6 console.log(multiplyByFive(10))
7 // output: undefined
1 function multiplyByFive(value) {
2 return value * 5
3 }
4
5 console.log(multiplyByFive(10))
6 // output: 50
Other documents randomly have
different content
«Signora Marchesa, voi mi chiudeste la porta di vostra casa, ed io
passai per la finestra. Sono sul balcone, ed aspetto i vostri ordini.»
«Luigi.»
(Indignata). Oh! quale arditezza! ma io chiamerò gente (riflette) no,
non va bene.... nascerebbe uno scandalo. Ah, signor Luigi, voi siete
sul balcone con questo gelo, eccovi punito, stateci tutta la notte
(chiude col catenaccio). Ora sono sicura. Cioè, non mi metto certo in
letto; leggerò qui accanto al fuoco, e domani lo troverò gelato (siede
sulla poltrona). La è però una crudeltà; poverino, fa un freddo
dannato.... ebbene, se ne vada per la strada che è venuto. Ma ora
che ci penso, di là non c’è mezzo a discendere, non vi è il pergolato
sotto. Dunque resti, per me ci penso punto, faccia il suo comodo e
buona notte (pausa). Infine che vuole? cos’è venuto a far qui?... Mio
Dio! mi prende rimorso; potrebbe morirsi pel freddo. — Per carità, è
meglio aprire, e farlo ridiscendere dalla finestra (va verso il balcone),
mi tremano le mani. Ah, prima chiudasi questa porta che mette nelle
stanze di mia cognata; potrebbero sentirlo (chiude l’uscio a destra,
poi apre il balcone). Signore! venga fuori, e se ne vada per dove è
venuto (siede sulla poltrona voltando le spalle a Luigi che entra).
Luigi (entra lentamente, rinchiude la vetriata e resta indietro).
Marchesa (senza voltarsi). Dunque, signore, se ne va, oppure debbo
farlo accompagnare da’ miei servi?... non risponde nemmeno? ha
forse la lingua gelata?
Luigi. Eh! ci manca poco.
March. Si sbrighi, apra la finestra, e buona notte. Fortuna per lei che
non ha trovato una donna di cuor duro.
Luigi. Ci aveva contato prima sul suo buon cuore.
March. Non ascolto verbo, vada via.
Luigi. Ma prima... mi permetta...
March. Signore! Io mi meraviglio di lei. Che fosse ardito, lo sapeva,
ma sino a questo punto... (sempre senza voltarsi).
Luigi. Per carità, marchesa, non si alteri, ne avrei troppo dolore. Lo
depongo qui sul tavolo?
March. Che cosa?
Luigi. Il mio mazzolino che le offro pel suo giorno onomastico. Le
pare che io avrei potuto lasciarmi sfuggire una sì bella occasione
senza darle prova del mio profondo rispetto?
March. Ah! ella intende darmi prova di rispetto passando per la
finestra?
Luigi. Il rispetto si esprime come si può. Per la porta non c’era il
passo libero, e sarebbe stata dal canto mio una grave mancanza
quella di non rimediarvi alla meglio.
March. Ho capito. Ora può andare.
Luigi. Signora marchesa, non mi faccia quest’affronto; accetti i fiori di
mia mano, poi me ne vado. Poverini sono intirizziti.
March. No. Le ho detto d’andare, e badi che se indugia ancora
chiamo gente.
Luigi. Se avesse quest’intenzione l’avrebbe già fatto; ma ella è tanto
buona.
March. Eppure le ripeto che...
Luigi. Non si faccia cattiva; io non ci credo; tanto è vero che ella ha
persino chiuso quella porta.
March. (con stizza). Ah!...
Luigi. Dunque? (con preghiera).
March. Dia qui quei fiori.
Luigi (avanzandosi lentamente). Eccoli.
March. Presto.
Luigi. Gli è che non posso camminare, ho le membra irrigidite dal
gelo.
March. (voltandosi a guardarlo). Mio Dio, com’è stravolto!
Luigi. Lo credo... se restava là un altro poco, era finita.
March. (con premura generosa). Oh! mi perdoni, signore, sono una
gran trista! (lo fa sedere sulla poltrona).
Luigi (riscaldandosi al fuoco). Grazie, signora marchesa, il cielo vi
restituisca altrettanto.
March. (ironica). Spero che non ne avrò di bisogno, perchè certo non
vado ad arrampicarmi per le finestre come...
Luigi. Come un furfante. Dica pure, signora. Ma io ho una gran
giustificazione.
March. E sarebbe?
Luigi. Sarebbe che io son venuto qui a cercare della cosa mia.
March. Il giudizio forse?
Luigi. Cerco la mia testa che si ostina a gironzarle intorno.
March. Questo sarebbe un confessare che ella è senza testa. A lei,
eccole il mio Album, cerchi, e se la porti via.
Luigi. Scusi, ma la mia testa non ci può stare lì dentro.
March. Perchè? ce ne sono tante d’altri.
Luigi. Saranno teste piccole.
March. Certo la sua è più grossa; c’è tanto fumo!
Luigi. È tutto quello mi resta del mio amor proprio.
March. Basta; ora che si è riscaldato, spero che se ne vorrà andare.
Luigi. Io, no certo.
March. Oh!
Luigi. Non già che io voglia, è lei che mi manda.
March. Come le aggrada.
Luigi (alzandosi). Se debbo dir il vero non avrei mai sperato di
trovare tanta indulgenza; ho scoperto in lei una dote superiore a
quella già grande della sua bellezza...
March. Sentiamola.
Luigi. La generosità.
March. Ma siccome non bisogna dare negli eccessi, così nel
ringraziarla tanto della sua bontà, la prego di andar via.
Luigi. Lo vuole proprio?
March. (affettando serietà). Signor Luigi! se io non la conoscessi per
originale, direi che ella è...
Luigi. Animo, me lo dica su.
March. Un pocolino temerario...
Luigi. È un sistema che adotto; dicono che così facendo s’incontra
fortuna colle donne.
March. Questa volta però...
Luigi. Fui fortunatissimo, perchè mi trovo qui a quest’ora, solo, colla
più amabile fra le donne.
March. Ella si schermisce a complimenti.
Luigi. Faccio come il cane, il quale lambisce la mano che gli tira le
orecchie.
March. Ecco, per esempio, una similitudine mal trovata.
Luigi. E perchè? l’atto di mandarmi via è per me assai più che tirarmi
le orecchie, e per conto mio le giuro che accetterei di restar qui tutta
la notte anche a costo di pagar domani la mia felicità colla vita.
March. Va bene.... ho capito, ma vada.
Luigi. È troppo giusto. Signora marchesa, i miei rispetti. Ridiscendo
dalla finestra, come i gatti. È il caso di dire che l’amore invece
dell’ali, mi ha dato quattro gambe (verso la finestra). Dunque buona
sera; mi perdoni l’audacia, e se domani sentirà dire che io fui trovato
morto sotto le sue finestre, pensi pure che mi sono scavezzato il
collo.
March. Via, signore, non faccia pompa di eroismo. Scommetto che
c’è una corda alla finestra.
Luigi. La signora s’inganna... venga a vedere.
March. (dopo aver guardato). E come farà?
Luigi. Mi provo.
March. E se ruzzolasse abbasso?
Luigi. Pazienza! siamo tanto in alto, che non avrei tempo di pensarci
sopra.
March. Signore! Ella ha voluto rendermi complice di qualche
disgrazia!
Luigi. Starebbe a lei prevenirla.
March. Allora scenda come può; già infine tutto è commedia; avrà
preso le sue precauzioni.
Luigi. Le giuro che no, tanto è vero che era disposto a morir di
freddo sul suo verone. L’ho scritto nel mio biglietto.
March. Nego. Sul biglietto non vi è nulla di tutto ciò.
Luigi. Guardi meglio.
March. (riprende il biglietto). Ecco qui. Non c’è altro.
Luigi. Ma volti. (legge) «Comprendo benissimo che la mia è temerità
eccessiva; se vorrà punirmene, mi lasci fuori per tutta la notte, e
colla presente, scritta di mio pugno, l’assolvo da ogni responsabilità
qualora diventassi sorbetto.»
(La marchesa resta sopra pensiero). Dopo tutto, signora, mi sembra
d’essere stato poco indulgente con me stesso.
March. Sì, ma infine avrebbe picchiato per farsi aprire.
Luigi. No certo. Anzi, se madama la marchesa lo desidera, ritorno sul
verone, e vi starò a suo piacimento. Dal canto mio sarò ben lieto di
scontare un poco il mio peccato.
March. Manco male che ne conviene.
Luigi. Certo! e se mi fosse lecito proclamerei ai quattro venti la sua
grande indulgenza.
March. Badi, signore, che non mi merito questa réclame, tanto è vero
che la costringo a scendere dalla finestra.
Luigi. E che perciò? Ella fa il dover suo.
March. Tuttavia se le accadesse qualche malore ne sarei desolata.
Luigi. Grazie, bella marchesa! le sue parole mi danno coraggio.
Scenderei dalla luna per farle piacere. Però, una preghiera. Io
scendo, ma può darsi che invece precipiti, ed allora... felice notte.
March. Ebbene?
Luigi. Ebbene, mi rincrescerebbe passare all’altro mondo senza esser
certo del suo perdono.
March. È perdonato.
Luigi. Desidero altro, un bacio su quella graziosa manina.
March. Oh!
Luigi (con grazia). È la preghiera di un morente!
March. (tende la mano). A lei (Luigi la bacia, ma mentre fa per
andarsene ella lo trattiene serrando la mano). Peraltro, signor mio,
non riesco a comprendere la cagione di questa sua eccentricità. Per
portarmi i fiori? non valeva la pena d’arrischiarsi a tanto.
Luigi. La signora marchesa mi permetterà di tacere — preferisco
scender subito.
March. Si tratta forse d’una scommessa?
Luigi (serio). Signora, aveva pur detto d’avermi perdonato, ma quel
suo pensar così male sui miei propositi, mi addolora.
March. Dunque dica su.
Luigi. Signora, no. Se entro nella via delle confidenze ridivento
colpevole. Eppoi l’ora è tarda. Ella avrà forse bisogno di riposo.
(Notisi che qui parla maliziosamente, e fingendo una riserva che non
ha).
March. Chissà! forse non ci penso ancora, passerò qualche tempo
leggendo; anzi, se ella avesse qualche storiella in pronto, così tanto
per impiegare una mezz’ora...
Luigi. E poi?
March. Poi studieremo un mezzo per farlo scender con minor
pericolo.
Luigi. Accetto di cuore.
March. Allora s’accomodi... racconti ed io lavorerò un poco. (La
marchesa occupa la poltrona, Luigi siede presso di lei).
Luigi. Signora marchesa, io sono franco, e le dico sinceramente che
se domani dovessi morire, non mi lamenterei.
March. Lo credo io, non ne avrebbe più il tempo.
Luigi. Ah! mi dimenticava che ella è materialista.
March. E lei?
Luigi. Una volta lo era io pure, ma mi sono corretto; ho cambiato
dottrina.
March. Evviva la fede.
Luigi. Non mi parli di fede, tutto è convenzione a questo mondo; si
giudica sempre dal punto di vista delle convenienze.
March. Se ne avessi il tempo, mi proverei a convertirlo.
Luigi. Lo tenti, ma sarà fatica sprecata, ed anzi in questo momento
mi persuado viemmeglio delle assurdità del materialismo.
March. Mi dica in grazia, perchè ha cambiato bandiera?
Luigi. Non è cosa agevole il dirlo, ma quello che sento alla vista del
bello mi esalta, mi commove, e certo la materia non ha tanto potere.
Oh! io mi meraviglio altamente che ella non creda nell’ignoto! ma si
guardi, signora marchesa, si guardi nello specchio, cerchi ne’ suoi
occhi pieni di fuoco, e mi neghi se lo può la potenza del fascino. Io
poi che la vedo nel suo insieme, io che in guardarla mi sento acceso
d’entusiasmo non posso porre in dubbio l’esistenza di quell’anima
che si cela sotto forme sì vaghe; non posso negare che vi siano degli
angioli, se me ne vedo davanti uno tanto bello.
March. (con fino motteggio). Molto bene. Ella si serve di tutto per
venire allo scopo. — Ha spezzato una lancia contro il materialismo
per farmi un po’ di corte.
Luigi. No, proprio davvero, non c’entra la premeditazione; egli è nella
foga di parlare che mi sono tradito.
March. Poverino, si è tradito! — Ella fa gran sfoggio d’ingenuità, ma,
caro mio, gli ingenui non vanno in casa delle signore passando per le
finestre.
Luigi. Madama la marchesa si dimentica che per me la porta era
chiusa.
March. Eravi forse necessità di venir stassera?
Luigi. Certo, passata la festa si spegne il moccolo, dice il proverbio,
domani era tardi per portare i fiori.
March. Non era un gran male!
Luigi. Comprendo benissimo che il mio omaggio è per lei cosa di
poco conto, e che altri migliori di me si meritano preferenze,
tuttavia, anche colla certezza di essere tenuto fra gli ultimi, non sarei
stato meno colpevole lasciandomi sfuggire l’occasione per
dimostrarle che la mia devozione per lei è tanto grande, quanto la
sua degnazione per me.
March. Signor Luigi! io non credo d’averle mai dato diritto ad un
rimprovero così acerbo. Se a mostrarsi sinceramente amica si
guadagna il compenso di essere mal compresa, ne sono dolente. —
Ella non è per nulla l’ultimo fra i miei amici, anzi se mi fosse lecito far
delle distinzioni, ne farei a suo riguardo. Lo sa più di quanto io possa
provarglielo. La mia condizione m’impone dei riguardi che io debbo
subire rassegnata, epperciò quando incontro un amico sincero,
mentre col cuore gli sono gratissima, debbo però usare seco lui quel
fare vago che non desta sospetti o maldicenze. Sa pure che io voglio
mantenere assoluta la mia libertà d’azione. Ho i miei capricci e
dubito molto degli uomini; sono vedova e voglio godermi in pace la
vita; ma ciò non impedisce che io possa degnamente apprezzare un
sentimento d’amicizia vera ed affettuosa. Ella dunque, signor mio, è
un ingrato; perchè sa tutte queste cose senza che io mi sforzi a
provargliele, eppure si diletta a metterle in dubbio.
Luigi. In fede mia, ella ha tutte le ragioni (stringendole la mano).
Sono proprio un ingrato, giacchè se è vero che posseggo un poco
della sua amicizia, ho assai più che non mi meriti.
March. Così va bene.
Luigi. A dirla franca, mi pareva che il barone Calani occupasse un
posto distinto.
March. Oh! Cielo, mi fa una corte ostinata, non trascura nulla, dai
mazzolini parlanti ai confetti colle cartoline amorose; ma io non sono
tanto ingenua da cader nelle reti per sì poco.
Luigi. E quel marchesino?
March. Mio cugino? Colui mi fa il galante colla certezza d’averne
diritto. È mio parente, e lo tratto come tale. Del resto è una creatura
molto noiosa.
Luigi. Il conte Pollini però è uomo di spirito, e mi sembra degno di
occupare una sedia chiusa.
March. Sì, il conte è meco molto amabile, ma anche lui ha il suo
difetto. Si figuri che dice di sognarmi tutte le notti, o colle corna da
diavoletto, o colle ali d’angelo.
Luigi. E lei ci crede.
March. Può chiedermelo? non credo agli uomini quando son desti,
dovrei fidarmi se dormono?
Luigi. Peccato!
March. Perchè mai?
Luigi. Aveva io pure un sogno da raccontarle.
March. Dica, sentiamo, per lei faccio un’eccezione.
Luigi. Ma non crede?
March. (ironica). Altrochè! e ci punterò sopra cento lire al lotto.
Luigi. Allora ritiro il sogno; ma badi, signora marchesa, i sogni sono
rivelazioni divine, Giuseppe salvò l’Egitto.
March. E lei sarebbe un nuovo Giuseppe?
Luigi. Signora no, per quanto poco ci tenga al mio carattere d’uomo,
pure le confesso che non sarebbe necessario di lacerarmi il mantello
per trattenermi.
March. Peccato che le manchi l’occasione.
Luigi. Si provi lei a prendermi per i panni.
March. (alzandosi). Invece la storia è alquanto modificata; madama
Putifarre manda via Giuseppe.
Luigi. Dunque non vuol saperne del mio sogno? Ella è una donna
senza fede.
March. Tutt’altro! di fede ne ho molta, quella che mi manca è la
buona fede.
Luigi. Ecco una graffiata che non mi merito. Mandarmi via sta bene,
ma così bruscamente... Se non racconto il mio sogno, non morirò
tranquillo.
March. Me ne rincresce tanto, ma la è proprio così.
Luigi. In guardia, signora marchesa! questa sua repentina risoluzione
potrebbe contraddirla alquanto su quella indifferenza che vanta
tanto.
March. Vale a dire?
Luigi. Vale a dire che mandandomi via ella confessa in certo modo
che la mia presenza le desta un po’ di turbamento.
March. Oh! questo poi no. Ma ella è un gran briccone, e mi costringe
a darle prova del mio sangue freddo. Animo ritorni qui, e mi racconti
il suo sogno.
Luigi. Così va bene! (si siedono ancora).
March. Racconti pure.
Luigi. Eccomi (tossisce), prima di tutto, dichiaro che trattandosi di un
sogno io non ci ho nessuna responsabilità. Quando si entra nel regno
di Morfeo, bisogna adattarvisi alla meglio.
March. Questa è la prefazione.
Luigi. Se la signora marchesa sel ricorda, pochi giorni sono, mi invitò
a scrivere dei versi nel suo album.
March. (con intelligenza). Ah! sì.
Luigi. C’è una strofa infine che dice:
Affettando negligenza
Della croce ei ne fa senza,
E portar si degna appena
All’occhiello un picciol nastro.
Tiene al collo gran catena.
Un baston da borgomastro,
Con sussiego guarda attorno,
E si gonfia dal piacere,
Se si sente dire intorno
«Riverito, Cavaliere!»
E di simil raffataglia
Tanto è zeppa quest’Italia
Che ne incontri ad ogni istante
In ogni angolo di via,
E in tal modo andando avante,
Stammi a udir la profezia,
Si faranno cavalieri
Truffatori e burattini
Gabbamondi, barattieri
Stenterelli ed Arlecchini.
LA MORALE
Tu sei l’immagine
D’una speranza
Bella ed eterea
Nella sembianza,
Tutti ti guardano
Siccome un punto
Inaccessibile
Non mai raggiunto,
Tutti t’ammirano,
Ognun ti ha in bocca,
Ma infin dell’opera
Nessun ti tocca.
Il prete in pergamo
Ti canta lodi,
E di te predica
In mille modi;
Ma spesso ipocrita
Mentre si piega,
In fondo all’anima
Poi ti rinnega,
E lodi e prediche
Che a josa insacca,
Non son che il trespolo
Della baracca.
Dall’alte cattedre
Gravi retori
D’austere regole
Son banditori;
Coll’arma facile
Della parola
Fan d’arzigogoli
Confusa scuola,
Ma infin gonfiandosi
Con ciance vane,
Fan nulla e gracchiano
Come le rane.
Tutti t’inneggiano
MORALE Santa,
Ognun discepolo
Di te si vanta,
Delle tue massime
Si fa gran smercio
Come d’articoli
Messi in commercio;
E ti conservano
Nella vetrina
La dama rigida
E la sgualdrina.
Severi giudici
E magistrati
Sempre si vantano
Da te guidati;
Di te si dicono
Spezzata lancia,
Ma moralissimi
Son per la pancia;
Di Temi cingono
L’alma corona,
E tengon moccolo
Al Dio Mammona.
Servi di maschera
A una genìa
Grama per cinica
Ipocrisia;
Se badi a chiacchiere,
Sei vocazione
D’ogni ridicolo
D’ogni buffone;
Tutti ti spacciano
A piene mani,
Pseudo-filosofi
E ciarlatani.
Gente da trógolo
Sinistra e scura,
Coscienze livide
D’ogni lordura
Di te s’adornano
E vanno attorno,
Alto acclamandoti
E notte e giorno;
Ma sotto all’egida
Della tua maglia
Il marchio celano
Della canaglia.
Quei contafrottole
Leccastivali
Che ti strascinano
Su pei giornali,
Son gente equivoca
Che fa negozio
Di buone massime
Per stare in ozio;
Anime tenere
Fior di candore
Che ai loro comodi
Hanno il pudore.
Codesti arcangeli
Della grand’era
Diventan nottole
In sulla sera;
Deposto l’abito
Dell’apparenza,
Si fanno lecita
Ogni impudenza,
E poi risalgono
Sulla bigoncia
E ti contrattano
Un tanto all’oncia.
Nuovi proseliti
De’ tuoi dettati
Lenoni e protei
Son diventati;
Di fede in pubblico
Fan l’impresario,
Trecconi ignobili
Dietro il sipario,
E da neofiti
Di simil razza
Povera vittima
Sei tratta in piazza.
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.
ebooknice.com