<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pravin1389</id>
		<title>Script | Spoken-Tutorial - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pravin1389"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Special:Contributions/Pravin1389"/>
		<updated>2026-04-15T05:19:12Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LaTeX/C3/Beamer-Themes-and-Animation-in-LaTeX/English</id>
		<title>LaTeX/C3/Beamer-Themes-and-Animation-in-LaTeX/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LaTeX/C3/Beamer-Themes-and-Animation-in-LaTeX/English"/>
				<updated>2021-12-08T12:10:27Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script''': Beamer Themes and Animation&lt;br /&gt;
&lt;br /&gt;
'''Author: Preeti Bamane'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: Video tutorial, TeXWorks, Ubuntu Unicode, Beamer Themes, Color themes, Overlays'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = &amp;quot;1&amp;quot;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide:&lt;br /&gt;
|| Hello and welcome to the spoken tutorial on '''Beamer Themes and Animation'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''Learning Objectives'''&lt;br /&gt;
|| In this tutorial, we will learn to,&lt;br /&gt;
&lt;br /&gt;
# Use '''Beamer themes'''&lt;br /&gt;
# Do '''text animations''' using '''Overlay''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 3: System Requirements'''&lt;br /&gt;
|| This tutorial is recorded using&lt;br /&gt;
&lt;br /&gt;
* '''Windows 11''' and&lt;br /&gt;
* '''TeXworks''' editor v0.6. &lt;br /&gt;
&lt;br /&gt;
The steps demonstrated will work in all operating systems.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 4: Prerequisites'''&lt;br /&gt;
||&lt;br /&gt;
&lt;br /&gt;
* To practise this tutorial, you should be familiar with '''LaTeX commands.'''&lt;br /&gt;
* You should also know how to create a presentation using '''Beamer'''.&lt;br /&gt;
* If not, then go through the prerequisite '''LaTeX''' spoken tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide 5: Code Files'''&lt;br /&gt;
||&lt;br /&gt;
* The files used in this tutorial are available in the '''Code files''' link on this tutorial page.&lt;br /&gt;
* Please download and extract the files&lt;br /&gt;
* Make a copy and use them for practising. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''Demonstration'''&lt;br /&gt;
|| For this demonstration, I will be using the '''Beamer theme Matrix'''.&lt;br /&gt;
&lt;br /&gt;
The same is available at this link:-&lt;br /&gt;
&lt;br /&gt;
[https://hartwork.org/beamer-theme-matrix/ https://hartwork.org/beamer-theme-matrix/] &lt;br /&gt;
&lt;br /&gt;
Open a '''web browser''' and go to this '''URL'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Show the beamer page&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Navigate row-wise on the left&lt;br /&gt;
&lt;br /&gt;
Navigate column-wise on the top&lt;br /&gt;
&lt;br /&gt;
Hover the mouse on any one of the theame&lt;br /&gt;
|| '''Theme matrix''' shows various '''themes''' and '''color theme '''combinations included with the '''Beamer class'''. &lt;br /&gt;
&lt;br /&gt;
The rows of the '''matrix''' show the list of the different '''Beamer themes'''.&lt;br /&gt;
&lt;br /&gt;
The columns of the '''matrix''' show the list of the different '''Beamer color themes. '''&lt;br /&gt;
&lt;br /&gt;
When the cursor is placed over an image, it shows the corresponding '''theme '''and '''color theme'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Go to '''Downloads''' folder &amp;gt;&amp;gt; '''Beamer-Code-Files'''&lt;br /&gt;
|| Go to the folder where all the '''Code files''' are downloaded on your machine.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Open '''beamerThemesAndAnimation.tex''' in TeXworks&lt;br /&gt;
|| Open the file '''beamerThemesAndAnimation.tex''' in '''TeXworks editor'''.&lt;br /&gt;
&lt;br /&gt;
We will see some '''LaTeX code''' written in the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| Let’s try to understand the '''code'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Highlight: '''\usetheme{Warsaw}'''&lt;br /&gt;
|| '''\usetheme{Warsaw} '''is added to the preamble to use the '''Warsaw theme''' in '''Beamer'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Warsaw theme '''displays a header on the '''pdf''' slide.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Highlight:''' \section and \subsection'''&lt;br /&gt;
|| In the document, I have inserted the '''\section''' and '''\subsection''' before each '''frame''' begins.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Highlight the '''section''' and '''subsection''' names&lt;br /&gt;
|| The '''section''' and '''subsection''' names will be displayed in the header of the slide.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| At the top left drop-down &amp;gt;&amp;gt; select '''pdfLaTeX'''&lt;br /&gt;
|| At the top left, in the drop-down select '''pdfLaTeX,''' if not already selected.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Click on the green arrow button&lt;br /&gt;
|| Then click on the green arrow button to '''compile''' the file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Compile''' the file once again to update the '''theme'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the pdf output&lt;br /&gt;
|| On '''compilation''', we get the '''pdf''' output with the '''Warsaw theme'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Highlight the header&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight the section names&lt;br /&gt;
|| In the slide, we can see a header.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It says '''Beamer Themes''' and '''Introduction, '''one below the other.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Highlight the section names in the TeXworks file.&lt;br /&gt;
|| These are the names we defined in the '''sections'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the green right arrow in the output window&lt;br /&gt;
|| In the output window, go to the next slide using the green-coloured right arrow.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the top section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on “'''Color Themes'''”&lt;br /&gt;
|| Look at the header portion of the '''pdf slide.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Section '''name''' “Beamer Themes”''' is seen on the left banner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the '''subsection '''name '''“Themes” '''is seen on the right banner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Highlight the section and subsection names in the TeXworks file.&lt;br /&gt;
|| These are the names we defined in the '''sections '''and '''subsections'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Highlight the '''section''' or '''subsection''' names. &lt;br /&gt;
|| You can go to any slide by clicking on the '''section''' or '''subsection''' names. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Click on '''Color Themes'''&lt;br /&gt;
|| Click on '''Color Themes''' on the top right banner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the pdf output &lt;br /&gt;
&lt;br /&gt;
Slide: '''Beamer Themes Color Themes'''&lt;br /&gt;
|| The respective '''section''' name and '''subsection''' name of the slide you are on, get highlighted. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In my case, '''Beamer Themes''' and '''Color Themes''' get highlighted. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the pdf output&lt;br /&gt;
&lt;br /&gt;
Slide: Introduction&lt;br /&gt;
|| Let’s click on '''Introduction'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are directed to the '''Introduction''' slide.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| So, this part sort of behaves like a '''navigation panel'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Back to '''beamerThemesAndAnimation.tex'''&lt;br /&gt;
|| Let’s go back to the '''code'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[TeXworks]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Beamer themes''' can be combined with a '''color theme.''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[TeXworks] &amp;lt;/nowiki&amp;gt;Type:&lt;br /&gt;
&lt;br /&gt;
'''\usecolortheme{beaver}'''&lt;br /&gt;
|| To do so, before the '''begin document command, '''type the '''code '''as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[TeXworks] Highlight&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''\usetheme{Warsaw}'''&lt;br /&gt;
&lt;br /&gt;
'''\usecolortheme{beaver}'''&lt;br /&gt;
|| Always put the '''\usecolortheme command''' below the '''\usetheme command'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Compile twice&lt;br /&gt;
|| Now '''compile''' the file twice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the pdf output&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Observe the output. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''colortheme command''' changed the '''color''' used for different '''elements'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s go back to the '''code'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[TeXworks] Update&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''\usetheme{Madrid}'''&lt;br /&gt;
&lt;br /&gt;
'''\usecolortheme{crane}'''&lt;br /&gt;
|| Let’s try another '''theme''' and '''theme color.''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Update the '''\usetheme''' and '''\usecolortheme''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[TeXworks] Highlight&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\usetheme{Madrid}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\usecolortheme{crane}&lt;br /&gt;
|| I have set the '''theme '''to '''Madrid '''and the '''colortheme''' to '''crane.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Compile twice&lt;br /&gt;
|| '''Compile''' the file twice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the pdf output&lt;br /&gt;
|| We can see the generated '''pdf''' output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It has the '''Madrid theme''' along with the''' crane colortheme.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| Next, we will see how to add''' Text Animation''' on the slides.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''Overlays'''&lt;br /&gt;
||&lt;br /&gt;
* '''Overlay''' is a term used by the '''Beamer document class''' to describe the '''layering''' of slides.&lt;br /&gt;
* There are a number of '''commands''' that enable us to use '''overlays '''on''' text'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Let’s see important '''overlays''' one by one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Switch to the '''text editor'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[TeXworks] Update the code:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\section{Animation}&lt;br /&gt;
&lt;br /&gt;
\subsection{onslide command}&lt;br /&gt;
&lt;br /&gt;
\begin{frame}&lt;br /&gt;
&lt;br /&gt;
\frametitle{Overlay: onslide}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\onslide&amp;lt;1-&amp;gt;{First Line of Text} \\&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\onslide&amp;lt;2-&amp;gt;{Second Line of Text} \\&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\onslide&amp;lt;3-&amp;gt;{Third Line of Text}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
\end{frame}&lt;br /&gt;
|| Replace the '''document section code''' as shown here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[TeXworks] Highlight&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\onslide&amp;lt;number-&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| The number inside the angle brackets tells '''LaTeX''' which slides the '''item''' should appear on. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''hyphen''' is used for '''continuation'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Compile&lt;br /&gt;
|| On '''compilation,''' we get the output as seen here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the pdf output&lt;br /&gt;
&lt;br /&gt;
Slide: Animation on onslide &lt;br /&gt;
|| In the generated '''pdf''', click on the green right arrow to go to the next page. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Observe that our three lines of text are appearing one by one in a sequential order.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Back to '''beamerThemesAndAnimation.tex'''&lt;br /&gt;
|| Switch to the '''editor '''once again.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[TeXworks] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\setbeamercovered{transparent} &lt;br /&gt;
|| Let’s make the '''text''' transparent on an unspecified slide. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next to the line '''\frametitle''' type the '''code''' as shown here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Compile&lt;br /&gt;
|| '''Compile''' the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the pdf output&lt;br /&gt;
|| Observe the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The upcoming slide texts appear as transparent text.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[TeXworks] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\subsection{uncover command}&lt;br /&gt;
&lt;br /&gt;
\begin{frame}&lt;br /&gt;
&lt;br /&gt;
\frametitle{Overlay: uncover}&lt;br /&gt;
&lt;br /&gt;
\setbeamercovered{transparent}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\uncover&amp;lt;1&amp;gt; { First Line of Text} \\&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\uncover&amp;lt;3&amp;gt; {Third Line of Text} \\&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\uncover&amp;lt;2&amp;gt; { Second Line of Text} \\&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\uncover&amp;lt;5&amp;gt; {Fifth Line of Text} \\&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\uncover&amp;lt;4&amp;gt; {Fourth Line of Text}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
\end{frame}&lt;br /&gt;
|| In the '''tex '''file, before the '''\end{document} command''' type the '''code''' as shown here. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[TeXworks] &amp;lt;/nowiki&amp;gt;Highlight: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''\uncover'''&amp;lt;nowiki&amp;gt;&amp;lt;1&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Observe that here we have used''' \uncover''' instead of '''\onslide'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''\uncover''' is with a digit present within angular brackets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will display the '''text''' on the slide depending on the number given here. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that, here we have also changed the order of appearance of the text.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Compile&lt;br /&gt;
|| '''Compile''' the file&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the pdf output&lt;br /&gt;
&lt;br /&gt;
slide: Animation \uncover command &lt;br /&gt;
|| Using the '''navigation''' arrow, go to the slide''' Animation \uncover command.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here only one out of five '''line items '''is appearing on the slide and the rest are transparent.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When you further '''navigate''', it displays the third item instead of the second item.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[TeXworks] &amp;lt;/nowiki&amp;gt;Highlight&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\uncover&amp;lt;3&amp;gt; {Third Line of Text} \\&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\uncover&amp;lt;2&amp;gt; { Second Line of Text} \\&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| This is because in the '''code''' the third '''item''' is mentioned as the second '''item.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the second '''item''' is mentioned as the '''third''' item using the '''\uncover command.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[TeXworks] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
\subsection{only command}&lt;br /&gt;
&lt;br /&gt;
\begin{frame}&lt;br /&gt;
&lt;br /&gt;
\frametitle{Overlay: only}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\only&amp;lt;1&amp;gt;{First Line of Text}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\only&amp;lt;2&amp;gt;{Second Line of Text}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\only&amp;lt;3&amp;gt;{Third Line of Text}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
\end{frame}&lt;br /&gt;
|| In the '''tex '''file, before the '''\end{document} command''', type the '''code''' as shown here. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[TeXworks] &amp;lt;/nowiki&amp;gt;Highlight&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;\only&amp;lt;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| The '''command \only''' works exactly like the '''\uncover command'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The only exception is that it does not reserve any space for the hidden '''text'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Compile&lt;br /&gt;
|| '''Compile''' the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the pdf output &lt;br /&gt;
&lt;br /&gt;
slide: Animation \only command&lt;br /&gt;
|| Go to the slide''' Overlay: only command.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While '''navigating''' to the right, we can see only the respective '''item, '''and not the''' '''other '''items'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also, all the '''items '''are appearing in the same '''line'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| This is how we can customize '''LaTeX''' slides as per our requirement.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| With this, we have come to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Let us summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''Summary'''&lt;br /&gt;
|| In this tutorial, we have learnt to:&lt;br /&gt;
&lt;br /&gt;
* Add '''Beamer themes''' and '''color themes'''&lt;br /&gt;
* Do '''text animations''' using '''Overlay''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''Assignment'''&lt;br /&gt;
|| As an assignment, &lt;br /&gt;
&lt;br /&gt;
* Add a new '''beamer theme Hannover''' and &lt;br /&gt;
* '''Color theme seahorse '''&lt;br /&gt;
* To the file '''beamerThemesAndAnimation.tex'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
||&lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by the Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide&lt;br /&gt;
|| The script was contributed by Preeti, FOSSEE Summer Fellowship 2019&lt;br /&gt;
&lt;br /&gt;
And this is Praveen signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining. &lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C4/Setting-Preferences/English</id>
		<title>LibreOffice-Suite-Draw-6.3/C4/Setting-Preferences/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C4/Setting-Preferences/English"/>
				<updated>2021-10-25T13:09:08Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{| border=1 &lt;br /&gt;
|| '''Visual Cue'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': &lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
|| Welcome to the spoken tutorial on '''Setting Preferences '''in '''LibreOffice Draw.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide:'''&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|| In this tutorial, we will learn to set the following '''preferences''':&lt;br /&gt;
&lt;br /&gt;
* '''Properties '''&lt;br /&gt;
* Create '''versions'''&lt;br /&gt;
* View the drawing in '''Color'''/'''grayscale ''' and ''' black-and-white'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Prerequisites'''&lt;br /&gt;
|| To practise this tutorial, you should have basic knowledge of '''LibreOffice Draw.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant '''Draw''' tutorials please visit this website.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
|| This tutorial is recorded using,&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04 and &lt;br /&gt;
* '''LibreOffice Suite''' version 6.3.5&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to the file '''3DObjectsChart '''which is already open.&lt;br /&gt;
|| Let us open the file '''3D-Objects-Chart '''that we had saved earlier.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: '''&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|| &lt;br /&gt;
* This file has been provided to you in the''' Code files''' link on this tutorial page&lt;br /&gt;
* Please download and extract the file&lt;br /&gt;
* Make a copy and then use it for practising&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the Draw page.&lt;br /&gt;
|| Suppose we want to add '''descriptions '''to this file for later reference.&lt;br /&gt;
|- &lt;br /&gt;
|| From the '''Main '''menu, select '''File ''' &amp;gt;&amp;gt; click '''Properties'''&lt;br /&gt;
|| To do so, from the '''Main '''menu, select '''File '''and click on '''Properties'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Properties '''dialog box appears&lt;br /&gt;
|| The '''Properties '''dialog box opens.&lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''General '''tab.&lt;br /&gt;
|| Click the '''General '''tab if not already selected.&lt;br /&gt;
&lt;br /&gt;
All the information that is relevant to the file is listed here.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the details.&lt;br /&gt;
|| Please note: &lt;br /&gt;
&lt;br /&gt;
* You can only view the file details here. &lt;br /&gt;
* You cannot make any changes.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''Description '''tab.&lt;br /&gt;
&lt;br /&gt;
Point to the '''Title''', '''Subject''', '''Keywords '''and '''Comments '''fields&lt;br /&gt;
|| Next, click on the '''Description''' tab.&lt;br /&gt;
&lt;br /&gt;
Here we can enter the '''Title''', '''Subject''', '''Keywords '''and '''Comments '''as required.&lt;br /&gt;
&lt;br /&gt;
This information can be used for later reference.&lt;br /&gt;
|- &lt;br /&gt;
||'''Title '''field &amp;gt;&amp;gt; type''' 3D Objects Chart'''&lt;br /&gt;
|| In the '''Title '''field, let us type “'''3D Objects Chart”.'''&lt;br /&gt;
|- &lt;br /&gt;
||'''Subject '''field &amp;gt;&amp;gt; type '''3D Objects Comparisons'''.&lt;br /&gt;
|| In the '''Subject '''field, we will type '''3D Objects Comparisons'''.&lt;br /&gt;
|- &lt;br /&gt;
||'''Keywords ''' &amp;gt;&amp;gt;type '''3D''', 3'''D Effects'''.&lt;br /&gt;
|| In '''Keywords''', we will type '''3D '''comma '''3D Effects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Finally, in the '''comments '''field let us enter the comment '''Learning about File Properties'''.&lt;br /&gt;
|| Finally, in the '''Comments '''field, type '''Learning about File Properties.'''&lt;br /&gt;
&lt;br /&gt;
You can type any other relevant information of your choice here, as well.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': &lt;br /&gt;
&lt;br /&gt;
'''Set Properties''' &lt;br /&gt;
|| Additionally, we may want to set:&lt;br /&gt;
&lt;br /&gt;
* The date on which the document was prepared&lt;br /&gt;
* The editor of the document&lt;br /&gt;
* The client for whom the document was prepared, etc.&lt;br /&gt;
&lt;br /&gt;
'''Draw''' has features that help you customize this information.&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to the '''Draw '''file.&lt;br /&gt;
&lt;br /&gt;
'''Properties '''dialog &amp;gt;&amp;gt; click '''Custom Properties'''. &lt;br /&gt;
&lt;br /&gt;
Point to the fields '''Name''', '''Type '''and '''Value'''.&lt;br /&gt;
|| In the '''Properties '''dialog box, click the '''Custom Properties '''tab.&lt;br /&gt;
&lt;br /&gt;
Here we see three fields: '''Name''', '''Type '''and '''Value'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''Add '''button.&lt;br /&gt;
&lt;br /&gt;
Point to the drop down-boxes under each field.&lt;br /&gt;
|| Let’s click the '''Add Property '''button at the bottom right.&lt;br /&gt;
&lt;br /&gt;
We will now see drop down-boxes under each field. &lt;br /&gt;
|- &lt;br /&gt;
|| Click on Name drop-down &amp;gt;&amp;gt; Select Date Completed.&lt;br /&gt;
|| Click on the '''Name '''drop-down and select the '''Date Completed''' option.&lt;br /&gt;
|- &lt;br /&gt;
|| In the '''Type '''drop-down,&amp;gt;&amp;gt; select '''Date Time.'''&lt;br /&gt;
|| In the '''Type '''drop-down, we will select '''Date Time'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''Value '''field that indicates date and time.&lt;br /&gt;
|| The '''Value '''field will now indicate the current date and zero time.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''date '''field&lt;br /&gt;
|| Let us not change the '''date'''.&lt;br /&gt;
|- &lt;br /&gt;
|| In the '''Time '''field, enter 10:30:33.&lt;br /&gt;
|| But in the '''Time '''field, we will enter 10:30:33.&lt;br /&gt;
&lt;br /&gt;
Now we can know the '''date '''on which the '''document''' was prepared and the time.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Add Property '''button.&lt;br /&gt;
|| Let us now add another field.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Add Property '''button at the bottom right once again.&lt;br /&gt;
&lt;br /&gt;
We will see a second row of drop-down boxes.&lt;br /&gt;
|- &lt;br /&gt;
|| The second list of drop-down boxes &amp;gt;&amp;gt; select '''Checked by '''in '''Name''',&lt;br /&gt;
|| In the '''Name '''drop-down, let us select '''Checked by '''option.&lt;br /&gt;
|- &lt;br /&gt;
|| For the '''Type '''field &amp;gt;&amp;gt; select '''Text'''.&lt;br /&gt;
|| For the '''Type '''field, we will select '''Text'''.&lt;br /&gt;
|- &lt;br /&gt;
|| In '''Value '''&amp;gt;&amp;gt; type the text “'''Reviewer 1'''”&lt;br /&gt;
|| In the '''Value field''' type the text “'''Reviewer 1'''”.&lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''OK''' button.&lt;br /&gt;
|| Click the '''OK '''button at the bottom right of the dialog box to update the changes.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Next, let’s learn how to delete a '''property''' that we created.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to the '''Main '''Menu, select '''File '''&amp;gt;&amp;gt; click '''Properties'''&lt;br /&gt;
|| Go to the '''Main '''menu, click on '''File '''and select '''Properties'''.&lt;br /&gt;
|- &lt;br /&gt;
|| In the '''Properties '''dialog box &amp;gt;&amp;gt; click''' Custom Properties'''.&lt;br /&gt;
|| In the '''Properties '''dialog box, click the '''Custom Properties '''tab, if not already selected.&lt;br /&gt;
&lt;br /&gt;
Notice that the rows of properties are alphabetically arranged.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the property '''Checked by'''.&lt;br /&gt;
|| Let us delete the first property '''Checked by'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''Remove property '''button on the right.&lt;br /&gt;
|| To do so, click the '''Remove Property''' button on the right.&lt;br /&gt;
&lt;br /&gt;
The particular property gets deleted.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''OK'''.&lt;br /&gt;
|| Now, click the '''OK '''button at the bottom right.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: '''&lt;br /&gt;
&lt;br /&gt;
'''Save Multiple Versions'''&lt;br /&gt;
|| We can save multiple versions of the same '''Draw '''file.&lt;br /&gt;
&lt;br /&gt;
This feature is called '''Versions'''.&lt;br /&gt;
&lt;br /&gt;
Let’s learn how to do that.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': &lt;br /&gt;
&lt;br /&gt;
'''Save Multiple Versions'''&lt;br /&gt;
&lt;br /&gt;
|| For example, you may-&lt;br /&gt;
&lt;br /&gt;
* Add objects on the first day and save them.&lt;br /&gt;
* Modify the drawing the next day.&lt;br /&gt;
* Want to keep both the original drawing and the modified one.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to the '''Draw '''file.&lt;br /&gt;
|| Let us save the file using the '''Versions '''option.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to '''File ''' &amp;gt;&amp;gt; click '''Versions'''&lt;br /&gt;
|| From the '''Main''' menu, go to '''File ''' and click '''Versions'''.&lt;br /&gt;
|- &lt;br /&gt;
|| New Versions dialog box opens.&lt;br /&gt;
|| A dialog box opens with the file name. &lt;br /&gt;
|- &lt;br /&gt;
|| Click ''' Save New Version '''&lt;br /&gt;
|| Click on the '''Save New Version''' button under the '''New versions''' section.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Insert Version Comment '''dialog appears &lt;br /&gt;
&lt;br /&gt;
Type '''Version 1'''.&lt;br /&gt;
|| We will see the''' Insert Version Comment '''dialog box.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s type the comment '''Version 1'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''OK'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Close'''&lt;br /&gt;
|| Click the '''OK''' button at the bottom right, to close the''' Insert Version Comment''' dialog box.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then close the '''Versions '''dialog box by clicking on the '''Close''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the text''' Geometric Shapes in 2D and 3D'''&lt;br /&gt;
&lt;br /&gt;
Replace it with''' Geometry in 2D Shapes and 3D Shapes.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click and Drag to select.&lt;br /&gt;
|| Now let us change the title text to '''Geometry in 2D Shapes and 3D Shapes. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the text.&lt;br /&gt;
|- &lt;br /&gt;
|| On Sidebar Deck &amp;gt;&amp;gt; click '''PROPERTIES ''' &amp;gt;&amp;gt;section &amp;gt;&amp;gt; Font Color drop-down &amp;gt; Blue &amp;gt;&amp;gt; Font size to 24&lt;br /&gt;
 &lt;br /&gt;
Click on the '''X''' icon to close the '''sidebar Deck'''.&lt;br /&gt;
|| In the '''Sidebar Deck., '''click on the '''Properties''' icon.&lt;br /&gt;
&lt;br /&gt;
Let’s change the colour of the text to blue and the Font Size to 24.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Close the '''sidebar Deck.'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Drag the text box to adjust the size.&lt;br /&gt;
|| Adjust the size of the text box to fit the text.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Now, let us save the file using the '''Versions '''option once again.&lt;br /&gt;
|- &lt;br /&gt;
|| From '''Main '''menu &amp;gt;&amp;gt; Go to '''File ''' &amp;gt;&amp;gt; '''Versions'''&lt;br /&gt;
|| From the '''Main '''menu, go to '''File '''and click on '''Versions'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Save New Version'''.&lt;br /&gt;
|| In the dialog box, click on the '''Save New Version '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Insert Version Comment '''dialog appears.&lt;br /&gt;
|| The''' Insert Version Comment '''dialog box appears.&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''Version 2'''.&lt;br /&gt;
|| Type the comment '''Version 2'''.&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button in the box&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the box.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Yes''' button in the box.&lt;br /&gt;
&lt;br /&gt;
|| A message box pops up asking us to confirm the action.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Yes''' button in the box.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the two '''versions '''listed.&lt;br /&gt;
|| We see two versions listed under '''Existing Versions'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Version 1''' and '''Version 2'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Version 1'''&lt;br /&gt;
|| '''Version 1''' is the file with the black coloured title '''font'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Point to''' Version 2'''&lt;br /&gt;
|| '''Version 2''' is the file with the blue coloured title font.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''Version 1''' &amp;gt;&amp;gt; click '''Open'''.&lt;br /&gt;
|| Let us select '''Version 1''' and click on the '''Open '''button at the bottom right. &lt;br /&gt;
|- &lt;br /&gt;
|| Point to the title&lt;br /&gt;
|| '''Version 1''' file opens in a new window.&lt;br /&gt;
&lt;br /&gt;
A message appears at the top indicating that the file is open in '''read-only mode'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the ‘X’ button.&lt;br /&gt;
|| Let us close the''' Version 1''' file window. &lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| We can enable automatic saving of '''versions''', every time we close a '''Draw '''file.&lt;br /&gt;
|- &lt;br /&gt;
|| Main '''menu '''&amp;gt;&amp;gt; Go to '''File '''&amp;gt;&amp;gt; Click '''Versions'''&lt;br /&gt;
|| To do so, click on '''File '''and then click on '''Versions'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Always save a version on closing '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check this box&lt;br /&gt;
|| Notice a check-box option that says '''Always save a version on closing'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Check this box.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Close'''.&lt;br /&gt;
|| This will ensure that every time you close the '''Draw '''file, a new '''version '''will be saved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Close '''button. &lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide:'''&lt;br /&gt;
&lt;br /&gt;
'''Viewing Preferences'''&lt;br /&gt;
|| '''Draw''' allows us to set different viewing '''preferences '''to our file.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Let us change the view of this file to '''Grayscale'''.&lt;br /&gt;
|- &lt;br /&gt;
|| From the '''Main Menu '''&amp;gt;&amp;gt; select '''View '''&amp;gt;&amp;gt; click '''Color/Grayscale''' &amp;gt;&amp;gt; Click '''Grayscale'''.&lt;br /&gt;
|| Click on '''View''', go to '''Color/Grayscale''' and select '''Grayscale.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point towards the '''grey '''objects&lt;br /&gt;
&lt;br /&gt;
Click on the other pages in the Pages pane.&lt;br /&gt;
|| Immediately, we see all the objects are now displayed in grey colour.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Let’s change the view to '''Black and White'''.&lt;br /&gt;
|- &lt;br /&gt;
|| From the '''Main Menu ''' &amp;gt;&amp;gt; select '''View ''' &amp;gt;&amp;gt; click '''Color/Grayscale''' &amp;gt;&amp;gt; Click '''Black and White'''.&lt;br /&gt;
|| Click on '''View''', go to '''Color/Grayscale ''' and select '''Black and White'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point towards the black and white objects&lt;br /&gt;
|| Now we see all the objects are displayed in black and white.&lt;br /&gt;
|- &lt;br /&gt;
|| From the '''Main Menu''' &amp;gt;&amp;gt; select '''View '''&amp;gt;&amp;gt; click &lt;br /&gt;
&lt;br /&gt;
'''Color/Grayscale''' &amp;gt;&amp;gt; Click '''Color'''.&lt;br /&gt;
|| Let’s switch the view back to colour''' '''again, as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| The drawing is again displayed in the original colours.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the box.&lt;br /&gt;
&lt;br /&gt;
Click on the Yes button to save the file.&lt;br /&gt;
|| Let us save the file.&lt;br /&gt;
&lt;br /&gt;
Again the confirmation box pops up.&lt;br /&gt;
&lt;br /&gt;
Click on the Yes button to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''‘X’''' icon on the top right&lt;br /&gt;
|| Click on the X button to close the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| This brings us to the end of this tutorial&lt;br /&gt;
&lt;br /&gt;
Let us summarize.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
&lt;br /&gt;
|| In this tutorial, we learnt to set the following preferences in '''Draw''':&lt;br /&gt;
&lt;br /&gt;
* '''Properties '''of a '''Draw''' file&lt;br /&gt;
* Create '''versions'''&lt;br /&gt;
* View the drawing in '''color/grayscale '''and''' black-and-white'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: '''&lt;br /&gt;
&lt;br /&gt;
'''About Spoken Tutorial Project'''&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide:'''&lt;br /&gt;
&lt;br /&gt;
'''Spoken tutorial workshops'''&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using Spoken Tutorials and give certificates.&lt;br /&gt;
* For more details, please contact us.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: '''&lt;br /&gt;
&lt;br /&gt;
'''Forums'''&lt;br /&gt;
|| Please post your timed queries in this forum.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgement'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| The '''Spoken Tutorial''' project is funded by the '''Ministry of Education '''Govt. of India.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: '''&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|| This tutorial was originally contributed by DesiCrew Solutions Pvt. Ltd in 2011.&lt;br /&gt;
&lt;br /&gt;
This tutorial is contributed by Nikita Misal and Madhuri Ganapathi from IIT Bombay.&lt;br /&gt;
&lt;br /&gt;
Thank you for watching.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C4/Working-with-3D-Objects/English</id>
		<title>LibreOffice-Suite-Draw-6.3/C4/Working-with-3D-Objects/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C4/Working-with-3D-Objects/English"/>
				<updated>2021-10-25T11:45:54Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=1 &lt;br /&gt;
|| '''Visual Cue'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Title Slide'''&lt;br /&gt;
&lt;br /&gt;
'''Working with 3D Objects'''&lt;br /&gt;
|| Welcome to the spoken tutorial on''' Working with''' '''3D Objects '''in '''LibreOffice Draw.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Learning Objectives'''&lt;br /&gt;
|| In this tutorial, we will learn to,&lt;br /&gt;
&lt;br /&gt;
* Convert '''2D''' objects to '''3D''' using''' Extrusion. '''&lt;br /&gt;
* Insert '''3D''' shapes into a '''Draw page'''.&lt;br /&gt;
* Convert '''2D''' shapes to '''3D''' using the '''3D Rotation Object '''option.&lt;br /&gt;
* Apply '''3D effects''' to objects.&lt;br /&gt;
* Create special effects using '''Duplicate '''and''' Cross-fading.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: Prerequisites'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''https://spoken-tutorial.org/'''&lt;br /&gt;
|| To practise this tutorial, you should have basic knowledge of '''LibreOffice Draw.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, for relevant '''Draw''' tutorials please visit this website.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: System Requirements'''&lt;br /&gt;
|| This tutorial is recorded using, &lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04 and &lt;br /&gt;
* '''LibreOffice Suite''' version 6.3.5&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Object'''&lt;br /&gt;
|| Let’s draw a geometry chart that shows a '''2D '''shape and its equivalent '''3D '''form.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
* A square is a '''2D '''object and a''' cube '''is its '''3D '''form&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Open '''a new draw file&lt;br /&gt;
&lt;br /&gt;
Rename it as '''3D-objects-chart '''and save it on '''Desktop.'''&lt;br /&gt;
&lt;br /&gt;
|| Open a new''' Draw''' file.&lt;br /&gt;
&lt;br /&gt;
We will name the file as '''3D-objects-chart '''and save it on the '''Desktop'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Go to '''Standard toolbar''' &amp;gt;&amp;gt; Click on the '''Insert text''' '''box''' icon &amp;gt;&amp;gt; Draw a box''' '''by clicking and dragging.&lt;br /&gt;
|| Draw a '''textbox '''at the top of the page.&lt;br /&gt;
|- &lt;br /&gt;
|| Enter the text&lt;br /&gt;
&lt;br /&gt;
'''Geometric Shapes in 2D and 3D''' inside it.&lt;br /&gt;
|| Type the text &amp;quot;'''Geometric shapes in 2D and 3D'''&amp;quot; inside the '''box'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + A''' keys&lt;br /&gt;
|| Press '''Ctrl + A''' keys to select the entire text.&lt;br /&gt;
|- &lt;br /&gt;
|| In the '''Sidebar Deck''' &amp;gt;&amp;gt;  Click '''Properties''' icon &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Increase '''font size''' to 22&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''X '''button to close.&lt;br /&gt;
|| In the '''Sidebar Deck, '''click on the '''Properties''' icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Increase the '''font size''' to 22, as shown. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Click on '''Align Centre''' icon.&lt;br /&gt;
||Let us align the text to the centre of the '''textbox''', using the '''Align Centre''' icon.&lt;br /&gt;
|-&lt;br /&gt;
|| Close '''Sidebar Deck.'''&lt;br /&gt;
||Close the '''Sidebar Deck.'''&lt;br /&gt;
|- &lt;br /&gt;
|| On the '''Standard toolbar '''&amp;gt;&amp;gt;''' '''click on '''Align Objects '''&amp;gt;&amp;gt; '''Centred.'''&lt;br /&gt;
|| On the '''Standard toolbar, '''click on '''Align icon '''and then on '''Centred.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click anywhere else on the page&lt;br /&gt;
|| Click anywhere else on the page to deselect the '''textbox'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Move the cursor on the page.&lt;br /&gt;
|| Let us now divide the page into two vertical halves using a '''snap line.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click &amp;gt;&amp;gt; '''vertical ruler''' to see the two-sided arrow.&lt;br /&gt;
&lt;br /&gt;
Drag the '''snap line''' to the '''Draw '''page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the page divided into two '''halves'''.&lt;br /&gt;
|| Click on the '''vertical ruler''' to see the two-sided arrow.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drag the '''snap line''' to the centre of the page, to divide it into two halves approximately.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to '''Standard toolbar''' &amp;gt;&amp;gt; Click on the '''Insert Text Box''' icon and Draw a box on the left side.&lt;br /&gt;
&lt;br /&gt;
Type '''2D Shapes''' inside it.&lt;br /&gt;
|| Let’s insert a '''textbox '''on the left side of the '''Draw '''page.&lt;br /&gt;
&lt;br /&gt;
Type “'''2D Shapes” '''inside it.&lt;br /&gt;
|-&lt;br /&gt;
||Select the text by click and drag method.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Align Center''' icon.&lt;br /&gt;
||Select the text '''2D Shapes'''.&lt;br /&gt;
&lt;br /&gt;
Align the text to the centre of the text box.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to '''Standard toolbar''' &amp;gt;&amp;gt; Click on the '''Insert Text Box''' icon and Draw a box''' '''on the right side.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''3D Shapes''' inside it.&lt;br /&gt;
|| Let’s draw another '''textbox '''on the right side. &lt;br /&gt;
&lt;br /&gt;
Type “'''3D Shapes” '''inside it.&lt;br /&gt;
|-&lt;br /&gt;
||Select the text by click and drag method.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Align Center''' icon.&lt;br /&gt;
&lt;br /&gt;
||Select the text '''3D Shapes'''.&lt;br /&gt;
&lt;br /&gt;
Align the text to the centre of the '''textbox.'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Now we will enable the '''3D-settings'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''View '''&amp;gt;&amp;gt; Select '''Toolbars '''&amp;gt;&amp;gt; '''3D-settings'''.&lt;br /&gt;
|| From the '''Main menu''', click on '''View''', select '''Toolbars '''and '''3D-Settings'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the respective boxes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Drag and place it on the standard toolbar at a convenient location.&lt;br /&gt;
|| '''3D-Settings toolbox''' is displayed at the rightmost end of the '''Standard toolbar.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can drag and place it in a convenient location on the''' Standard toolbar.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some versions of '''Draw''', you may not be able to do so.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the left of the snap line.&lt;br /&gt;
|| First we’ll draw some '''2D '''shapes on the left of the '''snap line.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': &lt;br /&gt;
&lt;br /&gt;
'''Extrusion'''&lt;br /&gt;
|| The method of obtaining a '''3D ''' object using a '''2D ''' object is called '''Extrusion'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Basically, the surface is moved outward, to create the '''3D '''object.&lt;br /&gt;
|- &lt;br /&gt;
|| Draw a rectangle, a square,&lt;br /&gt;
&lt;br /&gt;
a circle and a triangle&lt;br /&gt;
&lt;br /&gt;
one below the other&lt;br /&gt;
|| Draw a rectangle, a square, a circle and a triangle one below the other.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to all the objects.&lt;br /&gt;
&lt;br /&gt;
Hold the''' shift''' key down click on the rectangle, a square, a circle and a triangle&lt;br /&gt;
&lt;br /&gt;
Or click and drag to see a dashed line rectangle enclosing all the objects.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Align''' icon drop down &amp;gt;&amp;gt; select '''Ceneterd''' option.&lt;br /&gt;
||Let us select the objects, as shown.&lt;br /&gt;
&lt;br /&gt;
Let us align the objects to the centre using the '''Centered''' option. &lt;br /&gt;
|- &lt;br /&gt;
|| Go to '''Fill Color''' in the '''drawing toolbar '''&amp;gt;&amp;gt; select '''Light Red 4.'''&lt;br /&gt;
||  Now we will change the colour of all the '''objects.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the''' Fill Color''' drop-down and select '''Light Red 4.'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Use the '''CTRL + C''' keys and create a copy of the objects. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press the '''CTRL + V''' keys to paste the objects.&lt;br /&gt;
|| Next, let’s copy and paste the objects by pressing '''Ctrl + C''' and '''Ctrl + V '''keys.&lt;br /&gt;
|- &lt;br /&gt;
|| Drag the copied objects and place them on the right half of the page.&lt;br /&gt;
|| Let’s drag the copied objects and place them on the right half of the page.&lt;br /&gt;
|- &lt;br /&gt;
|| Click anywhere else on the page&lt;br /&gt;
|| Click anywhere else on the page to deselect the objects.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the copied rectangle and right-click to view the '''context menu'''.&lt;br /&gt;
|| Now select the copied rectangle and right-click to view the '''context menu'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Convert '''and then select ''' To 3D.'''&lt;br /&gt;
|| Click on '''Convert '''and then select '''To 3D'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the cuboid.&lt;br /&gt;
|| The '''2D rectangle '''is converted to a '''cuboid'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''Square '''&amp;gt;&amp;gt; right click &amp;gt;&amp;gt; Click on '''Convert '''&amp;gt;&amp;gt; Select To '''3D'''&lt;br /&gt;
&lt;br /&gt;
Select the Circle &amp;gt;&amp;gt; right click &amp;gt;&amp;gt;Click on '''Convert '''&amp;gt;&amp;gt; Select To '''3D'''&lt;br /&gt;
&lt;br /&gt;
Select the '''Triangle '''&amp;gt;&amp;gt; right click &amp;gt;&amp;gt; Click on '''Convert '''&amp;gt;&amp;gt; Select To '''3D'''&lt;br /&gt;
|| Similarly, convert the copied square, circle and triangle into '''3D '''objects.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Double click on the box rectangle and&lt;br /&gt;
&lt;br /&gt;
Type the name as '''Rectangle.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type the names as '''Square''', '''Circle '''and '''Triangle '''in the corresponding objects.&lt;br /&gt;
|| Let’s type “'''Rectangle'''” inside the rectangle''' '''shape on the left. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similarly type “'''Square”''', “'''Circle” '''and “'''Triangle” '''in the corresponding objects.&lt;br /&gt;
|- &lt;br /&gt;
|| Double click on the right-side '''3D '''rectangle box.&lt;br /&gt;
|| However, we cannot type any text on the '''3D objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Insert Text Box''' icon.&lt;br /&gt;
|| To type text, we will need to use the '''Text '''tool.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Insert Text Box '''icon &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draw a '''textbox '''inside the cuboid&lt;br /&gt;
|| Click on the '''Insert Text Box '''icon and draw a '''textbox ''' inside the cuboid.&lt;br /&gt;
|- &lt;br /&gt;
|| Type the text '''Cuboid '''inside it.&lt;br /&gt;
|| Type the text &amp;quot;'''Cuboid'''&amp;quot; inside it.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the textbox and the cuboid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click and click on '''Group'''&lt;br /&gt;
|| The '''textbox''' and the cuboid are treated as two separate objects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, let’s '''group ''' the text and the corresponding object.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Insert Text Box '''icon &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draw a textbox inside the '''Cube.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Insert Text Box '''icon &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draw a textbox inside the '''Cylinder.'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''Insert Text Box '''icon &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Draw a textbox''' '''inside the '''Pyramid.'''&lt;br /&gt;
|| Similarly, draw '''textboxes''' for the other '''3D''' objects.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then type “'''Cube''', '''Cylinder”''' and “'''Pyramid”''' inside the corresponding objects.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Group each object and textbox.&lt;br /&gt;
||Let us group the objects as shown before.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''3D objects.'''&lt;br /&gt;
|| So, we have learnt to use the '''extrusion '''method to create '''3D '''objects from '''2D''' objects.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': &lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|| Pause this tutorial and do this '''assignment'''.&lt;br /&gt;
&lt;br /&gt;
* Add a new page to your '''Draw '''file.&lt;br /&gt;
* Draw a square and type the text '''Square''' inside it.&lt;br /&gt;
* Convert the square with text to '''3D'''.&lt;br /&gt;
* Compare the '''3D''' object text with the '''2D '''square text.&lt;br /&gt;
|- &lt;br /&gt;
||Show a glimpse of the completed assignment.&lt;br /&gt;
||Your completed assignment should look like this.&lt;br /&gt;
|-&lt;br /&gt;
||'''Slide:''' &lt;br /&gt;
&lt;br /&gt;
'''3D Shapes'''&lt;br /&gt;
||Draw provides a list of ready-made 3D shapes for direct use in a drawing.&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to the '''Draw '''file&lt;br /&gt;
&lt;br /&gt;
Point to the '''3D Objects''' in the''' drawing '''toolbar&lt;br /&gt;
|| '''Draw''' provides a list of ready-made '''3D '''shapes for direct use in a drawing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can insert these shapes using the '''3D Objects '''in the '''Drawing toolbar'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''View ''' &amp;gt;&amp;gt; Select '''Toolbars ''' &amp;gt;&amp;gt; '''3D-Objects'''.&lt;br /&gt;
|| Alternatively, click on '''View''', select '''Toolbars '''and '''3D-Objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| On the left side page right-click and select &amp;gt;&amp;gt; '''New '''page&lt;br /&gt;
|| Let’s insert a new page in our '''Draw '''file.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''Cone '''from the '''3D-Objects toolbar.'''&lt;br /&gt;
|| Select a shape from the '''3D-Objects '''toolbar, say, a '''Cone.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Move the '''mouse '''to the '''page '''and drag it on the '''page'''.&lt;br /&gt;
|| Then draw it on the page.&lt;br /&gt;
&lt;br /&gt;
We have a '''3D cone '''in '''gradient '''colour, on our page!&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| '''Draw''' also allows us to create '''3D '''objects using body rotation on '''2D '''objects.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''Isosceles Triangle '''on the drawing toolbar and drag to draw a triangle.&lt;br /&gt;
|| Let’s draw a triangle on the '''Draw '''page, as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click &amp;gt;&amp;gt; select '''Convert '''&lt;br /&gt;
&lt;br /&gt;
Choose To '''3D Rotation Object'''&lt;br /&gt;
|| Right-click for the context menu and select '''Convert'''.&lt;br /&gt;
&lt;br /&gt;
Then choose '''To 3D Rotation Object.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''3D object'''.&lt;br /&gt;
|| Observe what happens to the triangle.&lt;br /&gt;
&lt;br /&gt;
It is now a '''3D '''object!&lt;br /&gt;
&lt;br /&gt;
Shape of the '''3D object''' may vary a little depending on the drawn '''2D object'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to the '''standard '''toolbar and point to the '''Fontwork '''icon &amp;gt;&amp;gt; then click on it.&lt;br /&gt;
|| Next, click on the '''Fontwork icon '''on the '''Standard toolbar.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Fontwork Gallery '''dialog box.&lt;br /&gt;
|| The '''Fontwork Gallery''' dialog box opens up.&lt;br /&gt;
&lt;br /&gt;
If not visible, then click on '''View, Toolbars '''and''' Fontwork.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Fontwork''' icon at the bottom left corner of the '''Draw''' page&lt;br /&gt;
|| Then click on the '''Fontwork''' icon at the bottom left corner of the '''Draw''' page.&lt;br /&gt;
|-&lt;br /&gt;
||&lt;br /&gt;
|| The '''Fontwork Gallery''' dialog box opens up.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''Favorite 16''' &amp;gt;&amp;gt; Click on '''OK'''.&lt;br /&gt;
|| Let us select '''Favorite 16 '''and click on the '''OK '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the text '''Fontwork'''.&lt;br /&gt;
&lt;br /&gt;
Show text box with text.&lt;br /&gt;
|| The text &amp;quot;'''Fontwork'''&amp;quot; is displayed on our '''Draw '''page.&lt;br /&gt;
&lt;br /&gt;
The visible text may vary for different system configurations.  &lt;br /&gt;
|- &lt;br /&gt;
&lt;br /&gt;
|| Point to the text '''Fontwork'''&lt;br /&gt;
|| Now, we may want some other text in place of '''“Fontwork”'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
How can we do that?&lt;br /&gt;
|- &lt;br /&gt;
|| Double-click inside the text '''Fontwork'''&lt;br /&gt;
|| Simply double-click inside the text &amp;quot;'''Fontwork'''&amp;quot;.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to &amp;quot;'''Fontwork'''&amp;quot; in black colour&lt;br /&gt;
|| We will see the word &amp;quot;'''Fontwork'''&amp;quot; in black colour within the larger '''text'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select this text and type '''Spoken Tutorials'''&lt;br /&gt;
|| Select this '''text''' and type another text, for example &amp;quot;'''Spoken Tutorials'''&amp;quot;.&lt;br /&gt;
|- &lt;br /&gt;
|| Click anywhere on the '''Draw '''page.&lt;br /&gt;
&lt;br /&gt;
Point to the words.&lt;br /&gt;
|| Now click anywhere on the '''Draw '''page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The words &amp;quot;'''Spoken Tutorials'''&amp;quot; will now be displayed on the page.&lt;br /&gt;
|- &lt;br /&gt;
|| Resize the text once again.&lt;br /&gt;
|| Let us resize this text for better readability.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the cone.&lt;br /&gt;
|| Next, let us learn to apply effects''' '''to the''' 3D cone'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''cone '''&amp;gt;&amp;gt; Right-click for the context menu. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select '''3D Effects'''&lt;br /&gt;
|| Select the '''cone''', right-click for the context menu, and select '''3D Effects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point towards 3d effects dialog box&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to '''Geometry''', '''Segments''', '''Normals'''&lt;br /&gt;
|| The '''3D Effects''' dialog box appears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see various options here.&lt;br /&gt;
|- &lt;br /&gt;
|| Change '''Depth '''to '''3cm'''.&lt;br /&gt;
|| Let us change the '''Depth '''parameter to''' 3cm'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Under '''Segment '''&amp;gt;&amp;gt; '''Horizontal ''' '''12'''&lt;br /&gt;
|| Under '''Segment''', let us change '''Horizontal '''to '''12.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Under '''Normals '''&amp;gt;&amp;gt; select '''Flat'''.&lt;br /&gt;
|| Under '''Normals''', let us select the '''Flat '''option.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''preview '''window.&lt;br /&gt;
|| Observe the preview of the object in its '''Preview '''window at the bottom.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''Assign '''icon on the top-right corner of the dialog box &amp;gt;&amp;gt; now click it&lt;br /&gt;
|| Now click on the '''Assign '''icon at the top-right corner of the dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''X '''mark at the top-right corner of the dialog box.&lt;br /&gt;
|| Then click on the '''X '''icon at the top-right corner to exit the dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the changed shape.&lt;br /&gt;
|| Observe the effects on the '''cone'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''':''' Assignment'''&lt;br /&gt;
|| Here is another '''assignment '''for you.&lt;br /&gt;
&lt;br /&gt;
* Create a similar picture as shown on the slide.&lt;br /&gt;
* Use the '''Convert To 3D Rotation Object ''' option to achieve this.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Next, let’s create special effects using the '''Duplicate '''option.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''Pages pane''' &amp;gt;&amp;gt; right-click and select &amp;gt;&amp;gt; '''New Page'''.&lt;br /&gt;
|| Let’s insert a new page. &lt;br /&gt;
|- &lt;br /&gt;
|| In the drawing toolbar select '''Rectangle, Rounded''' move the mouse on the page.&lt;br /&gt;
&lt;br /&gt;
Draw a rounded rectangle.&lt;br /&gt;
|| Let us draw a rounded rectangle on the '''Draw''' page.&lt;br /&gt;
&lt;br /&gt;
Select the''' Rounded, Rectangle''' tool and draw the shape on the '''Draw '''page.&lt;br /&gt;
|- &lt;br /&gt;
|| From the '''Main '''menu select '''Edit '''&amp;gt;&amp;gt; click '''Duplicate'''.&lt;br /&gt;
|| From the '''Main '''menu, select '''Shape '''and click on '''Duplicate'''.&lt;br /&gt;
|- &lt;br /&gt;
|| The '''Duplicate '''dialog box appears.&lt;br /&gt;
|| The '''Duplicate '''dialog box appears.&lt;br /&gt;
|- &lt;br /&gt;
|| Values:&lt;br /&gt;
* Number of copies = 10&lt;br /&gt;
&lt;br /&gt;
Under '''Placement''' &lt;br /&gt;
* X Axis =0.10&lt;br /&gt;
* Y Axis = 0.20&lt;br /&gt;
* Angle = 5 degrees&lt;br /&gt;
&lt;br /&gt;
|| We will enter the following values -&lt;br /&gt;
* Number of copies = 10&lt;br /&gt;
&lt;br /&gt;
Under '''Placement'''&lt;br /&gt;
* X Axis = 0.10&lt;br /&gt;
* Y Axis = 0.20&lt;br /&gt;
* Angle = 5 degrees&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Enlargement'''&lt;br /&gt;
&lt;br /&gt;
Width = 0.20 Height = 0.30 &lt;br /&gt;
&lt;br /&gt;
Change&lt;br /&gt;
&lt;br /&gt;
'''Start '''color = '''Yellow End '''color = '''Red'''&lt;br /&gt;
|| We will keep the '''Enlargement''' values as '''default.'''&lt;br /&gt;
* Width = 0.20 and &lt;br /&gt;
* Height = 0.30&lt;br /&gt;
&lt;br /&gt;
Now we will change the '''Start '''color to '''Yellow ''' and '''End ''' color to '''Red.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''OK button.'''&lt;br /&gt;
|| Click on the '''OK '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the special effects.&lt;br /&gt;
&lt;br /&gt;
Point to the '''angles '''and other '''options '''as per the narration.&lt;br /&gt;
|| Look at the great special effects''' '''that we got!&lt;br /&gt;
&lt;br /&gt;
You can try many more effects by changing the angles and other values.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Now let’s create special effects using '''Cross-fading'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need two objects to create a''' Cross-fading effect'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on Insert Basic Shapes &amp;gt;&amp;gt; click and drag to draw Diamond.&lt;br /&gt;
&lt;br /&gt;
Click on Insert Basic Shapes &amp;gt;&amp;gt; click and drag to draw Ellipse.&lt;br /&gt;
|| Let us draw a diamond and an ellipse using '''Insert basic shapes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Click on''' Fill Color '''&amp;gt;&amp;gt; Select''' Red''' &amp;gt;&amp;gt; click on '''Diamond'''.&lt;br /&gt;
&lt;br /&gt;
Click on '''Fill Color''' &amp;gt;&amp;gt; Select '''Green''' &amp;gt;&amp;gt; click on '''Ellipse'''.&lt;br /&gt;
|| Let us change the colour of the '''diamond''' to red and the '''ellipse''' to green.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Select both the shapes &amp;gt;&amp;gt; click on '''Shape'''.&lt;br /&gt;
|| Select both the shapes.&lt;br /&gt;
&lt;br /&gt;
From the main menu select '''Shape''' and go to '''Cross-fading'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Default '''Increment''' value 16.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the checkboxes.&lt;br /&gt;
&lt;br /&gt;
|| The '''Cross-fading''' dialog box opens.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the box, a default value is seen in the '''Increments''' field. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can change this to any other value, say 20.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Leave the boxes checked for now.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''OK '''button.&lt;br /&gt;
|| Then click on the''' OK '''button in the box.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the''' cross-fading'''.&lt;br /&gt;
|| Observe the effect of '''Cross-fading''' on the objects.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + Z''' keys&lt;br /&gt;
|| Undo the changes by pressing '''Ctrl + Z''' keys.&lt;br /&gt;
|- &lt;br /&gt;
|| Select both the shapes &amp;gt;&amp;gt; click on '''Shape'''.&lt;br /&gt;
|| Select both the shapes once again.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From the main menu select '''Shape''' and go to '''Cross-fading'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Uncheck one box and click on OK.&lt;br /&gt;
|| Uncheck the checkboxes and observe the differences on the '''Draw''' page.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Save''' icon -&amp;gt; Click on the '''‘X’''' icon on the top right.&lt;br /&gt;
|| Let’s save all these changes and then close the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| This brings us to the end of this tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us Summarize.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Summary'''&lt;br /&gt;
|| In this tutorial, we have learnt to,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Convert '''2D''' objects to '''3D''' using''' Extrusion '''&lt;br /&gt;
* Insert '''3D''' shapes into a '''Draw''' page&lt;br /&gt;
* Convert '''2D''' shapes to '''3D''' using the '''3D Rotation Object '''option.&lt;br /&gt;
* Apply '''3D effects''' to objects&lt;br /&gt;
* Create special effects using '''Duplicate '''and''' Cross-fading.'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Assignment'''&lt;br /&gt;
|| Here is an assignment for you.&lt;br /&gt;
&lt;br /&gt;
Draw various shapes and try '''Duplicate''' and '''Cross-fading''' options using them.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: About Spoken Tutorial Project'''&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: Spoken tutorial workshops'''&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using Spoken Tutorials and give certificates.&lt;br /&gt;
* For more details, please contact us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: Forums'''&lt;br /&gt;
|| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: Acknowledgement'''&lt;br /&gt;
|| The '''Spoken Tutorial''' project is funded by the Ministry of Education, Govt. of India.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: Thank you'''&lt;br /&gt;
|| This tutorial was originally contributed by DesiCrew Solutions Pvt. Ltd in 2011. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tutorial is contributed by Nikita Misal and Madhuri Ganapathi from IIT Bombay. Thank you for watching.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Linux</id>
		<title>Linux</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Linux"/>
				<updated>2021-10-18T06:31:28Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Linux is one of the most popular Operating Systems used in today's world. Linux refers to the family of Unix-like computer operating systems using the Linux kernel. Linux can be installed on a wide variety of computer hardware, ranging from mobile phones, tablet computers and video game consoles to mainframes and supercomputers.&lt;br /&gt;
&lt;br /&gt;
It is an opensource software and the Linux kernel is released under the GNU General Public License and hence can be freely created, modified and distributed.&lt;br /&gt;
&lt;br /&gt;
Linux is actually just a kernel. Many people have put together distributions (often called flavors), that contain not just the kernel but also many other programming tools and utilities. Some well-known distributions include Red Hat Linux, Ubuntu, SuSE Linux, and Debian GNU/Linux.&lt;br /&gt;
&lt;br /&gt;
The real power of Linux can be tapped by using its wide and powerful storehouse of commands which need to be typed in on the terminal. The reason behind this is the fact that Linux can trace its intellectual heritage, if not its source code, to the Unix OS. Unix was developed much before GUI environments were dreamt of. Thus, Unix (and hence Linux) provides a wide array of flexible text-mode commands.&lt;br /&gt;
&lt;br /&gt;
In this tutorial we would mainly concentrate on how to use the wide variety of commands of Linux to handle files,directories,processes etc. These tutorials are created using Ubuntu version 9.04 and above.  Please see the associated text box of individual spoken tutorials on the website to decide the versions of Linux OS to which it is applicable. &lt;br /&gt;
&lt;br /&gt;
The Spoken Tutorial Effort for Linux has been contributed by Mr. Anirban Roy Choudhury. Other contributors who helped in the creation of the scripts and tutorials include Shahid Ali Farooqui, Shambulingayya, Anusha Kadambala, Anuvrat Parashar, Abhijit Sunil, Prashant Shah, Namita Menezes, Balasubramaniam S.N., Gaurav Shinde, Praveen S., Sachin Patil, Ashwini Patil, DesiCrew Solutions Pvt. Ltd., Nancy Varkey&lt;br /&gt;
&lt;br /&gt;
'''Learners''': Anyone who wishes to learn basics of system administration. Absolute must for beginners. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote style=&amp;quot;background-color: lemonchiffon; border: solid thin grey;&amp;quot;&amp;gt;&lt;br /&gt;
'''Linux Slide Template''' [[Media:linux_template.zip | (TEX Format)]]  &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
[[Glossary_for_Linux | Glossary]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; [[Media:linux_template_ppt.zip | (PPT Format)]]  &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; [[Media:linux_template_odp.zip | (ODP Format)]]&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
==Introduction to Linux - Novice==&lt;br /&gt;
# Ubuntu desktop &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Ubuntu Desktop&lt;br /&gt;
#* Main Menu&lt;br /&gt;
#* System Tray&lt;br /&gt;
#* Trash Bin icon (RHS corner)&lt;br /&gt;
#* Desktop icon (LHS corner), pen-drive &lt;br /&gt;
# Synaptic package manager&lt;br /&gt;
#*Synaptic Package Manager&lt;br /&gt;
#*How to install packages&lt;br /&gt;
# Ubuntu software system&lt;br /&gt;
#*Ubuntu-Software-Center&lt;br /&gt;
#*Installing softwares through Ubuntu Software Center&lt;br /&gt;
# Basic Commands &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Commands with example&lt;br /&gt;
#* Command interpreter&lt;br /&gt;
#* Shell&lt;br /&gt;
#* Using man&lt;br /&gt;
#* Apropos&lt;br /&gt;
#* Whatis &lt;br /&gt;
#* Using --help option&lt;br /&gt;
# General Purpose Utilities in Linux  &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* echo &lt;br /&gt;
#* uname &lt;br /&gt;
#* who&lt;br /&gt;
#* passwd&lt;br /&gt;
#* date&lt;br /&gt;
#* cal&lt;br /&gt;
#* Brief overview on Files and directories&lt;br /&gt;
#* pwd&lt;br /&gt;
#* ls &lt;br /&gt;
#* cat&lt;br /&gt;
# File System &amp;amp;nbsp; &amp;amp;nbsp;&lt;br /&gt;
#* File &lt;br /&gt;
#* Directory&lt;br /&gt;
#* File Inode&lt;br /&gt;
#* Types of Files&lt;br /&gt;
#* Home directory and Current directory&lt;br /&gt;
#* Change Directory(cd)&lt;br /&gt;
#* mkdir,rmdir&lt;br /&gt;
# Working with Regular Files &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* cat&lt;br /&gt;
#* rm&lt;br /&gt;
#* cp&lt;br /&gt;
#* mv&lt;br /&gt;
#* cmp&lt;br /&gt;
#* wc&lt;br /&gt;
# File Attributes &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* chown, chmod, chmod -R, displaying files with ls -l &lt;br /&gt;
#* chmod u+, chmod a-w, chmod g+w, chmod -r, chgrp &lt;br /&gt;
#* inode, hard link, symbolic link&lt;br /&gt;
# Redirection Pipes &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Input,output and error stream&lt;br /&gt;
#* Redirection : &amp;gt; and &amp;gt;&amp;gt;&lt;br /&gt;
#* Pipes : |&lt;br /&gt;
# Working with Linux Process &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Process&lt;br /&gt;
#* Shell process &lt;br /&gt;
#* Process spawning - parent and child process&lt;br /&gt;
#* Process attributes - pid, ppid&lt;br /&gt;
#* Init Process&lt;br /&gt;
#* User process &amp;amp; System process&lt;br /&gt;
#* ps with options&lt;br /&gt;
# The Linux Environment &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Environment variable vs Local variables&lt;br /&gt;
#* set command&lt;br /&gt;
#* env command &lt;br /&gt;
#* SHELL, HOME, PATH, LOGNAME, PS1, PS2&lt;br /&gt;
#* history&lt;br /&gt;
#* ! and ~&lt;br /&gt;
#* alias&lt;br /&gt;
#  Basics of System Administration &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Root login-su&lt;br /&gt;
#* User management -   UID, GID, useradd, usermod, userdel&lt;br /&gt;
#* Discs – Du, df&lt;br /&gt;
# Simple filters  &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Head &lt;br /&gt;
#* tail&lt;br /&gt;
#* sort&lt;br /&gt;
#* cut&lt;br /&gt;
#* paste&lt;br /&gt;
&lt;br /&gt;
==Introduction to Linux - Intermediate==&lt;br /&gt;
# The grep command &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* To see the content of a file&lt;br /&gt;
#* To list the entries of a particular stream&lt;br /&gt;
#* To ignore cases&lt;br /&gt;
#* Lines that do not match the pattern&lt;br /&gt;
#* To list the line numbers with the entries&lt;br /&gt;
#* To store the result in another file&lt;br /&gt;
#* To know the count&lt;br /&gt;
#  More on grep command &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Search using grep&lt;br /&gt;
#* To match more than one pattern&lt;br /&gt;
#* To check a word that has different spelling&lt;br /&gt;
#* Character class&lt;br /&gt;
#* The use of *&lt;br /&gt;
#* To match any one character using dot&lt;br /&gt;
#* To match a pattern at the beginning of the file&lt;br /&gt;
#* To match a pattern at the end of the file&lt;br /&gt;
# The sed command &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* sed&lt;br /&gt;
#* To print using sed&lt;br /&gt;
#* Line Addressing&lt;br /&gt;
#* Context Addressing&lt;br /&gt;
#More on sed command &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* substitute&lt;br /&gt;
#* insert&lt;br /&gt;
#* delete&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
#Basics of awk &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Awk Preliminaries&lt;br /&gt;
#* Selection criteria&lt;br /&gt;
#* action&lt;br /&gt;
#* Formatted printing - printf&lt;br /&gt;
#* Fields and -F option&lt;br /&gt;
#* Regular expressions&lt;br /&gt;
#* NR - number of records&lt;br /&gt;
#* Variables&lt;br /&gt;
# Networking tools &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Ping&lt;br /&gt;
#* Telnet&lt;br /&gt;
#* ftp&lt;br /&gt;
#* ssh&lt;br /&gt;
#* scp &amp;amp; sftp&lt;br /&gt;
#  Linux Process &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Fork&lt;br /&gt;
#* Exec&lt;br /&gt;
#* Wait&lt;br /&gt;
#* Nice&lt;br /&gt;
#* Kill with options&lt;br /&gt;
# More about Linux Process &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Cron, crontab&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C3/Layers-and-Editing-a-PDF/English</id>
		<title>LibreOffice-Suite-Draw-6.3/C3/Layers-and-Editing-a-PDF/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C3/Layers-and-Editing-a-PDF/English"/>
				<updated>2021-09-19T02:53:08Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=1 &lt;br /&gt;
|| '''Visual Cue'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Introduction'''&lt;br /&gt;
|| Welcome to the spoken tutorial on '''Layers and Editing a PDF '''in ''' LibreOffice Draw'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Learning Objectives'''&lt;br /&gt;
|| In this tutorial, you will learn to: &lt;br /&gt;
* Insert and modify '''layers'''&lt;br /&gt;
* Show dimension lines on a drawn '''object'''&lt;br /&gt;
* Edit a '''PDF''' document using '''LibreOffice Draw'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: System Requirements'''&lt;br /&gt;
|| This tutorial is recorded using, &lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04 and &lt;br /&gt;
* '''LibreOffice Suite''' version 6.3.5&lt;br /&gt;
|- &lt;br /&gt;
|| Open the file '''RouteMap'''.&lt;br /&gt;
|| I have opened the file '''RouteMap'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Code files'''&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial have been provided to you in the ''' Code files''' link on this tutorial page&lt;br /&gt;
* Please download and extract the files&lt;br /&gt;
* Make a copy and then use them for practising&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''What are Layers?'''&lt;br /&gt;
|| Now let see what are '''Layers '''in '''Draw.'''&lt;br /&gt;
&lt;br /&gt;
* '''Layers '''are like '''transparent '''sheets, placed one on the top of another&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the three layers on the Draw file.&lt;br /&gt;
&lt;br /&gt;
Point to the tabs.&lt;br /&gt;
|| There are three '''layer tabs '''in every '''Draw''' file, by default.&lt;br /&gt;
&lt;br /&gt;
These '''tabs '''are visible at the bottom of the interface.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''Layout ''' '''Layer''' tab at the bottom&lt;br /&gt;
|| The '''Layout layer''' is displayed, by default.&lt;br /&gt;
&lt;br /&gt;
This is where we create our '''graphics'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Controls '''Layer.&lt;br /&gt;
|| The '''Controls layer''' is used to store control '''elements '''such as '''buttons '''and '''forms'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Dimensions '''Layer.&lt;br /&gt;
|| '''Dimension Lines layer '''is used to depict dimension lines for complex drawings.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Drawing of House'''&lt;br /&gt;
|| For example: here is the drawing of a house.&lt;br /&gt;
&lt;br /&gt;
It must have exact measurements of walls, electrical wiring positions and so on.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''Home ''' and then the '''School'''&lt;br /&gt;
|| Now let's print three maps that show the routes from '''Home '''to '''School'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| We will name them '''Map 1''', '''Map 2''' and '''Map 3'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Map 1''' &lt;br /&gt;
|| '''Map 1''' will show all the '''landmarks '''in the area.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Map 2''' &lt;br /&gt;
|| In '''Map 2''' we’ll remove the lake, stadium and commercial complex.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Map 3''' &lt;br /&gt;
|| In '''Map 3''', let’s show all the objects except the '''Park'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Do we need to create three separate maps to show these?&lt;br /&gt;
&lt;br /&gt;
No, '''Draw ''' provides a solution to this with the help of '''Layers'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to''' Routemap.'''&lt;br /&gt;
|| This way, there will be only one map file with many '''layers ''' of information.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''routemap'''.&lt;br /&gt;
|| We can print or view a combination of '''layers '''using one '''Draw ''' page.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''routemap'''.&lt;br /&gt;
|| Let us begin by adding '''layers''' to our '''RouteMap'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Layout '''Layer.&lt;br /&gt;
|| Click on the '''Layout layer''' tab.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click &amp;gt;&amp;gt; select '''Insert '''Layer&lt;br /&gt;
|| Right-click and select '''Insert Layer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Insert Layer''' dialog box appears.&lt;br /&gt;
|| The '''Insert Layer''' dialog box appears.&lt;br /&gt;
|- &lt;br /&gt;
|| In the “'''Name'''” field type “'''Layer four'''”.&lt;br /&gt;
|| In the “'''Name'''” field, type “'''Layer four'''”.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the “'''Title'''” and “'''Description'''” fields.&lt;br /&gt;
|| You can add any '''Title''' and '''Description''' that is relevant to your drawing.&lt;br /&gt;
|- &lt;br /&gt;
|| Type the '''Title''' as '''Map2'''.&lt;br /&gt;
&lt;br /&gt;
Type the '''Description''' as “'''This is the first new layer”'''&lt;br /&gt;
|| I will type “'''Map2” '''as the '''Title'''.&lt;br /&gt;
&lt;br /&gt;
And then add a short text in the '''Description '''field, as shown here.&lt;br /&gt;
|- &lt;br /&gt;
|| Check the boxes “'''Visible'''” and “'''Printable'''”.&lt;br /&gt;
|| Check the boxes “'''Visible'''” and “'''Printable'''”, if not already checked.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''OK'''&lt;br /&gt;
|| Then click the''' OK '''button''' '''to exit the dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the “''' Layer four'''” tab at the bottom.&lt;br /&gt;
|| Look at the bottom now.&lt;br /&gt;
&lt;br /&gt;
The new '''layer tab '''named '''Layer four '''is visible here'''.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Layout '''layer.&lt;br /&gt;
|| Click on the''' Layout layer tab''' once again.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the objects '''Lake, Stadium '''and '''Commercial complex'''.&lt;br /&gt;
&lt;br /&gt;
Holding down the '''shift key''', click on '''Commercial complex, Lake''' and '''Stadium'''. &lt;br /&gt;
|| Now let us simultaneously select some of the objects.&lt;br /&gt;
&lt;br /&gt;
Hold down the '''Shift''' key and click on '''Commercial complex, Lake''' and '''Stadium'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + X''' keys.&lt;br /&gt;
|| Press '''Ctrl + X''' keys to cut the objects. &lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Layer four''' &amp;gt;&amp;gt; press '''Ctrl + V''' keys&lt;br /&gt;
|| Then click on the '''Layer four tab''' and press '''Ctrl + V''' keys to paste them.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to them to show they are pasted in the same places.&lt;br /&gt;
|| The objects are pasted in the same positions as in the '''Layout layer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click anywhere on the '''Draw''' page.&lt;br /&gt;
|| Click anywhere on the '''Draw''' page to deselect the '''objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click to view the context menu &amp;gt;&amp;gt; Select '''Modify '''Layer.&lt;br /&gt;
|| Right-click on the '''Layer four tab''' to view the context menu.&lt;br /&gt;
&lt;br /&gt;
Select '''Modify Layer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Modify '''Layer dialog box appears&lt;br /&gt;
|| The '''Modify Layer''' dialog box appears.&lt;br /&gt;
|- &lt;br /&gt;
|| Uncheck the box “'''Visible'''” &amp;gt;&amp;gt; Click on the '''OK '''button.&lt;br /&gt;
|| Uncheck the '''Visible''' checkbox and click on the '''OK '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Point that the objects are not visible.&lt;br /&gt;
|| The '''object'''s in '''Layer four''' are no longer visible.&lt;br /&gt;
&lt;br /&gt;
The '''object'''s  are present physically but are not visible on the '''Draw page.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the map.&lt;br /&gt;
|| We have our '''Map2'''!&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Pages pane''' &amp;gt;&amp;gt; point to the '''objects'''.&lt;br /&gt;
|| Notice that on the '''Pages''' pane on the left, all the '''object'''s are seen on the '''page'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click to view the context menu &amp;gt;&amp;gt; Select '''Modify Layer'''.&lt;br /&gt;
|| On the '''Draw '''page, right-click on '''Layer four tab.'''&lt;br /&gt;
&lt;br /&gt;
From the context menu, select '''Modify Layer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Visible''' check box &amp;gt;&amp;gt; click on the '''OK''' button.&lt;br /&gt;
&lt;br /&gt;
Point to the '''Draw ''' page.&lt;br /&gt;
|| Click the '''Visible''' checkbox and click on the '''OK''' button.&lt;br /&gt;
&lt;br /&gt;
This will make all the objects visible on the '''Draw''' '''page''' again.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click on Layout Layer to view the context menu &amp;gt;&amp;gt; Select '''Insert '''Layer.&lt;br /&gt;
|| Similarly, let’s create another new '''layer''' and name it as '''Layer five'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Type the '''Title''' as '''Map3'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type the '''Description''' as “'''This is the second new layer.”'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK '''button to exit the the dialog box.&lt;br /&gt;
|| I will type “'''Map3” '''as the '''Title'''.&lt;br /&gt;
&lt;br /&gt;
And then add a short text in the '''Description '''field, as shown here.&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK ''' button to exit the '''dialog''' box.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Layer five.'''&lt;br /&gt;
|| Notice that this layer appears before '''Layer four'''.&lt;br /&gt;
|- &lt;br /&gt;
|| In the Layout layer &amp;gt;&amp;gt; select '''Park'''.&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; Press '''Ctrl + X keys'''.&lt;br /&gt;
&lt;br /&gt;
|| In the '''Layout layer tab,''' select '''Park'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl + X''' keys to cut it.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + V''' to paste it&lt;br /&gt;
|| Click on '''Layer five tab '''and press '''Ctrl + V''' keys to paste it.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click to view the context menu &amp;gt;&amp;gt; Select '''Modify '''Layer.&lt;br /&gt;
|| Right-click on '''Layer five tab ''' to view the context menu and select '''Modify Layer'''.&lt;br /&gt;
&lt;br /&gt;
Uncheck the '''Visible''' checkbox and click on the '''OK''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to Map 3.&lt;br /&gt;
|| We have successfully created '''Map3'''!&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click to view the context menu &amp;gt;&amp;gt; Select '''Modify '''Layer.&lt;br /&gt;
|| Let us make all the objects visible again.&lt;br /&gt;
&lt;br /&gt;
Right-click on '''Layer five tab.'''&lt;br /&gt;
&lt;br /&gt;
From the context menu, select '''Modify Layer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Visible''' check box &amp;gt;&amp;gt; click on the '''OK''' button.&lt;br /&gt;
&lt;br /&gt;
Point to the '''Draw '''page&lt;br /&gt;
|| Click the '''Visible''' checkbox and then click on the '''OK''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Assignment'''&lt;br /&gt;
|| Pause this tutorial and do this '''assignment'''.&lt;br /&gt;
&lt;br /&gt;
* Create two new '''routes''' from '''Home '''to the '''School Campus''' in the '''RouteMap '''drawing.&lt;br /&gt;
* Display each '''route''' on a separate '''layer'''.&lt;br /&gt;
* Print the two '''maps '''each displaying only one '''route'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the '''Draw''' page.&lt;br /&gt;
|| Next, let’s display the dimension lines for the drawn objects.&lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''Layout layer tab'''&lt;br /&gt;
|| Click the '''Layout layer tab''' in the '''Draw '''page.&lt;br /&gt;
&lt;br /&gt;
If any other '''layer''' is selected, the tools will appear disabled.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''Playground'''. &lt;br /&gt;
|| Let us show the dimension lines to measure the sides of the''' Playground.''' &lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''Lines and Arrows '''drop-down&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select '''Dimension Line '''icon.&lt;br /&gt;
|| Click on the '''Lines and Arrows '''drop-down.&lt;br /&gt;
&lt;br /&gt;
Select the '''Dimension Line '''tool.&lt;br /&gt;
|- &lt;br /&gt;
|| Move to the '''Draw''' page onto the '''Playground '''&amp;gt;&amp;gt; Place the cursor below the '''Playground '''at the left edge&lt;br /&gt;
&lt;br /&gt;
Drag it to the other end of the '''Playground'''. &lt;br /&gt;
&lt;br /&gt;
|| Move the cursor to the '''Draw''' page onto the '''Playground.'''&lt;br /&gt;
&lt;br /&gt;
The cursor changes to a plus sign.&lt;br /&gt;
&lt;br /&gt;
Place the cursor below or on the left edge and drag it to the other side.&lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''Lines and Arrows '''drop-down&lt;br /&gt;
&lt;br /&gt;
Select '''Dimension Line '''icon.&lt;br /&gt;
&lt;br /&gt;
Move to the '''Draw''' page onto the '''Playground '''&amp;gt;&amp;gt; Place the cursor below the '''Playground '''at the top edge&lt;br /&gt;
&lt;br /&gt;
Drag it to the bottom edge of the '''Playground'''.&lt;br /&gt;
|| Likewise, draw a '''dimension line''' to measure its breadth''' '''also.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Save''' icon &amp;gt;&amp;gt; Click on the '''‘X’''' icon on the top right&lt;br /&gt;
|| Let’s save our '''RouteMap ''' file and close it.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide:''' '''Edit a PDF Document'''&lt;br /&gt;
|| Now we will learn to edit a '''PDF''' document in '''Draw'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this, let us use the '''Resume.pdf''' file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This file is provided in the ''' Code files '''link.&lt;br /&gt;
|- &lt;br /&gt;
|| Open''' '''a new '''Draw''' file&lt;br /&gt;
|| I have open a new''' Draw''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''File''' menu and select '''Open.'''&lt;br /&gt;
&lt;br /&gt;
'''Open''' dialog box opens.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the ''' Resume.pdf''' file &amp;gt;&amp;gt; click on the '''Open''' button in the dialog box.&lt;br /&gt;
|| Click on the '''File''' menu and select '''Open'''.&lt;br /&gt;
&lt;br /&gt;
The '''Open''' dialog box appears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the '''Resume.pdf''' file and click on the '''Open''' button in the dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the filename on the menu bar.&lt;br /&gt;
|| '''Resume.pdf''' file is loaded on the '''Draw''' page.&lt;br /&gt;
|-&lt;br /&gt;
||Zoom in sufficiently to enlarge the text&lt;br /&gt;
||Let me zoom in for a better view.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Let us add some more information to this '''resume'''.&lt;br /&gt;
|- &lt;br /&gt;
|| From the standard tool click on the''' Insert Text Box icon'''.&lt;br /&gt;
|| From the '''Standard toolbar''', click on the''' Insert Text Box''' icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Draw a text box below '''MOTHER’s OCCUPATION. '''&lt;br /&gt;
|- &lt;br /&gt;
|| In the box type '''LANGUAGES KNOWN: ENGLISH, HINDI and MARATHI.'''&lt;br /&gt;
|| Inside the '''box''', type '''LANGUAGES KNOWN: ENGLISH, HINDI '''and '''MARATHI.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the double arrow icon.&lt;br /&gt;
&lt;br /&gt;
Select Font size and change it 14.&lt;br /&gt;
&lt;br /&gt;
Select Font Name &amp;gt;&amp;gt; Change to '''UnDotum'''.&lt;br /&gt;
|| Now select all the text within the box and change the '''font size '''to '''14'''.&lt;br /&gt;
&lt;br /&gt;
Then change font name to '''UnDotum'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select text '''RESUME''' by double-clicking on it.&lt;br /&gt;
|| Now select the text '''RESUME''' by double-clicking on it.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the double arrow icon.&lt;br /&gt;
&lt;br /&gt;
Select the '''Font size''' and change it to 20.&lt;br /&gt;
&lt;br /&gt;
Select the '''Font color''' and change it red.&lt;br /&gt;
&lt;br /&gt;
Click on underline icon.&lt;br /&gt;
|| Change the '''font size '''to 20 and the '''font''' colour to '''red'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then '''underline''' the text using the '''underline ''' icon.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the '''Draw''' file.&lt;br /&gt;
|| Now we will add some work experience details, also.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the I'''nsert Text Box '''icon and draw a text box below '''HOBBIES'''.&lt;br /&gt;
|| Again, click on the '''Insert Text Box''' icon and draw another text box below''' HOBBIES. '''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Work Experience: Working as Lecturer In ABC College Mumbai'''.&lt;br /&gt;
|| Inside this '''box''', type the work experience details, as shown.&lt;br /&gt;
|- &lt;br /&gt;
||Select the text. 			&lt;br /&gt;
&lt;br /&gt;
Click on the double arrow icon.&lt;br /&gt;
Select the font size and change it to 14.&lt;br /&gt;
&lt;br /&gt;
Select Font Name &amp;gt;&amp;gt; Change to '''UnDotum'''.&lt;br /&gt;
||Similarly, change the font size of the text to 14.&lt;br /&gt;
&lt;br /&gt;
Then the font name to '''UnDotum'''.&lt;br /&gt;
|-&lt;br /&gt;
||Point to  '''SELF EMPLOYED'''.&lt;br /&gt;
&lt;br /&gt;
Select the text box and press the '''Delete''' Key on the keyboard.&lt;br /&gt;
||Next, we will delete the text '''SELF EMPLOYED''' given in '''FATHER’S OCCUPATION'''.&lt;br /&gt;
|-&lt;br /&gt;
||Delete '''HOUSEWIFE''' and add '''PRIVATE TUTOR'''.&lt;br /&gt;
||Then edit the '''MOTHER’S OCCUPATION''' as '''PRIVATE TUTOR'''.&lt;br /&gt;
|-&lt;br /&gt;
||Drag and adjust the text boxes.&lt;br /&gt;
||You can drag and adjust the size of the text boxes to align them properly.&lt;br /&gt;
|-&lt;br /&gt;
|| Point below work experience.&lt;br /&gt;
|| Likewise, we can add other details as per our requirement to this '''PDF '''document. &lt;br /&gt;
|- &lt;br /&gt;
||File &amp;gt; Export &amp;gt;&amp;gt; Export as PDF.&lt;br /&gt;
&lt;br /&gt;
Name '''Resume-modified.pdf'''.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Export''' button in the dialog box. &lt;br /&gt;
||We will export the file as '''Resume-modified''' and save it on the '''Desktop'''.&lt;br /&gt;
&lt;br /&gt;
Then click on the '''Export''' button in the dialog box that opens.&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
||Click on the Save icon &amp;gt;&amp;gt; Click on the ‘X’ icon on the top right &lt;br /&gt;
|| Then save the file and close it.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the file on the '''Desktop'''.&lt;br /&gt;
&lt;br /&gt;
Right-click on the file and select '''Open With Document Viewer'''.&lt;br /&gt;
&lt;br /&gt;
|| Now we will open the '''PDF''' file saved on the '''Desktop'''.&lt;br /&gt;
&lt;br /&gt;
Right-click on the file and select '''Open With Document Viewer'''.&lt;br /&gt;
&lt;br /&gt;
You can open the file using any '''document viewer''' available on your system.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to all the new changes made.&lt;br /&gt;
|| Notice all the newly added information in the '''PDF '''document.&lt;br /&gt;
&lt;br /&gt;
This is how a '''PDF''' document can be edited very easily using '''LibreOffice Draw'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| This brings us to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Let us summarize.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Summary'''&lt;br /&gt;
||  In this tutorial you have learnt to:&lt;br /&gt;
* Insert and modify '''layers'''&lt;br /&gt;
* Show dimension lines on a drawn object&lt;br /&gt;
* Edit a '''PDF''' document using '''LibreOffice Draw'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Assignment'''&lt;br /&gt;
|| Here is an assignment for you.&lt;br /&gt;
&lt;br /&gt;
* Open the '''RouteMap '''file and export it as a '''PDF''' file.&lt;br /&gt;
* Open the '''PDF''' file in '''Draw'''.&lt;br /&gt;
* Insert a '''text box''' to show the title as “'''Route Map from Home to School'''”.&lt;br /&gt;
* Make the text '''bold''' and change the '''font size''' to 24.&lt;br /&gt;
* Align the text to the centre of the '''text box'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''About Spoken Tutorial Project'''&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Spoken tutorial workshops'''&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using Spoken Tutorials and give certificates.&lt;br /&gt;
* For more details, please contact us.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Forums'''&lt;br /&gt;
|| Please post your timed queries in this forum.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Acknowledgement'''&lt;br /&gt;
|| The '''Spoken Tutorial''' project is funded by the Ministry of Education, Govt. of India.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Thank you'''&lt;br /&gt;
|| This tutorial was originally contributed by '''DesiCrew Solutions Pvt. Ltd''' in 2011. &lt;br /&gt;
&lt;br /&gt;
This tutorial is contributed by Nikita Misal and Madhuri Ganapathi from IIT Bombay. &lt;br /&gt;
&lt;br /&gt;
Thank you for watching.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C3/Layers-and-Editing-a-PDF/English</id>
		<title>LibreOffice-Suite-Draw-6.3/C3/Layers-and-Editing-a-PDF/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C3/Layers-and-Editing-a-PDF/English"/>
				<updated>2021-08-09T11:04:35Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| border=1 &lt;br /&gt;
|| '''Visual Cue'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Introduction'''&lt;br /&gt;
|| Welcome to the spoken tutorial on '''Layers and Editing a PDF '''in ''' LibreOffice Draw'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Learning Objectives'''&lt;br /&gt;
|| In this tutorial, you will learn to: &lt;br /&gt;
* Insert and modify '''layers'''&lt;br /&gt;
* Show dimension lines on a drawn '''object'''&lt;br /&gt;
* Edit a '''PDF''' document&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: System Requirements'''&lt;br /&gt;
|| This tutorial is recorded using, &lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04 and &lt;br /&gt;
* '''LibreOffice Suite''' version 6.3.5&lt;br /&gt;
|- &lt;br /&gt;
|| Open the file '''RouteMap'''.&lt;br /&gt;
|| I have opened the file '''RouteMap'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Code files'''&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial have been provided to you in the ''' Code files''' link on this tutorial page&lt;br /&gt;
* Please download and extract the files&lt;br /&gt;
* Make a copy and then use them for practising&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''What are Layers?'''&lt;br /&gt;
|| Now let see what are '''Layers '''in '''Draw.'''&lt;br /&gt;
&lt;br /&gt;
* '''Layers '''are like '''transparent '''sheets, placed one on the top of another&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the three layers on the Draw file.&lt;br /&gt;
&lt;br /&gt;
Point to the tabs.&lt;br /&gt;
|| There are three '''layer tabs '''in every '''Draw''' file, by default.&lt;br /&gt;
&lt;br /&gt;
These '''tabs '''are visible at the bottom of the interface.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''Layout ''' '''Layer''' tab at the bottom&lt;br /&gt;
|| The '''Layout layer''' is displayed, by default.&lt;br /&gt;
&lt;br /&gt;
This is where we create our '''graphics'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Controls '''Layer.&lt;br /&gt;
|| The '''Controls layer''' is used to store control '''elements '''such as '''buttons '''and '''forms'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Dimensions '''Layer.&lt;br /&gt;
|| '''Dimension Lines layer '''is used to depict dimension lines for complex drawings.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Drawing of House'''&lt;br /&gt;
|| For example: here is the drawing of a house.&lt;br /&gt;
&lt;br /&gt;
It must have exact measurements of walls, electrical wiring positions and so on.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''Home ''' and then the '''School'''&lt;br /&gt;
|| Now let's print three maps that show the routes from '''Home '''to '''School'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| We will name them '''Map 1''', '''Map 2''' and '''Map 3'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Map 1''' &lt;br /&gt;
|| '''Map 1''' will show all the '''landmarks '''in the area.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Map 2''' &lt;br /&gt;
|| In '''Map 2''' we’ll remove the lake, stadium and commercial complex.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Map 3''' &lt;br /&gt;
|| In '''Map 3''', let’s show all the objects except the '''Park'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Do we need to create three separate maps to show these?&lt;br /&gt;
&lt;br /&gt;
No, '''Draw ''' provides a solution to this with the help of '''Layers'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to''' Routemap.'''&lt;br /&gt;
|| This way, there will be only one map file with many '''layers ''' of information.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''routemap'''.&lt;br /&gt;
|| We can print or view a combination of '''layers '''using one '''Draw ''' page.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''routemap'''.&lt;br /&gt;
|| Let us begin by adding '''layers''' to our '''RouteMap'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Layout '''Layer.&lt;br /&gt;
|| Click on the '''Layout layer''' tab.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click &amp;gt;&amp;gt; select '''Insert '''Layer&lt;br /&gt;
|| Right-click and select '''Insert Layer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Insert Layer''' dialog box appears.&lt;br /&gt;
|| The '''Insert Layer''' dialog box appears.&lt;br /&gt;
|- &lt;br /&gt;
|| In the “'''Name'''” field type “'''Layer four'''”.&lt;br /&gt;
|| In the “'''Name'''” field, type “'''Layer four'''”.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the “'''Title'''” and “'''Description'''” fields.&lt;br /&gt;
|| You can add any '''Title''' and '''Description''' that is relevant to your drawing.&lt;br /&gt;
|- &lt;br /&gt;
|| Type the '''Title''' as '''Map2'''.&lt;br /&gt;
&lt;br /&gt;
Type the '''Description''' as “'''This is the first new layer”'''&lt;br /&gt;
|| I will type “'''Map2” '''as the '''Title'''.&lt;br /&gt;
&lt;br /&gt;
And then add a short text in the '''Description '''field, as shown here.&lt;br /&gt;
|- &lt;br /&gt;
|| Check the boxes “'''Visible'''” and “'''Printable'''”.&lt;br /&gt;
|| Check the boxes “'''Visible'''” and “'''Printable'''”, if not already checked.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''OK'''&lt;br /&gt;
|| Then click the''' OK '''button''' '''to exit the dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the “''' Layer four'''” tab at the bottom.&lt;br /&gt;
|| Look at the bottom now.&lt;br /&gt;
&lt;br /&gt;
The new '''layer tab '''named '''Layer four '''is visible here'''.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Layout '''layer.&lt;br /&gt;
|| Click on the''' Layout layer tab''' once again.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the objects '''Lake, Stadium '''and '''Commercial complex'''.&lt;br /&gt;
&lt;br /&gt;
Holding down the '''shift key''', click on '''Commercial complex, Lake''' and '''Stadium'''. &lt;br /&gt;
|| Now let us simultaneously select some of the objects.&lt;br /&gt;
&lt;br /&gt;
Hold down the '''Shift''' key and click on '''Commercial complex, Lake''' and '''Stadium'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + X''' keys.&lt;br /&gt;
|| Press '''Ctrl + X''' keys to cut the objects. &lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Layer four''' &amp;gt;&amp;gt; press '''Ctrl + V''' keys&lt;br /&gt;
|| Then click on the '''Layer four tab''' and press '''Ctrl + V''' keys to paste them.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to them to show they are pasted in the same places.&lt;br /&gt;
|| The objects are pasted in the same positions as in the '''Layout layer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click anywhere on the '''Draw''' page.&lt;br /&gt;
|| Click anywhere on the '''Draw''' page to deselect the '''objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click to view the context menu &amp;gt;&amp;gt; Select '''Modify '''Layer.&lt;br /&gt;
|| Right-click on the '''Layer four tab''' to view the context menu.&lt;br /&gt;
&lt;br /&gt;
Select '''Modify Layer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Modify '''Layer dialog box appears&lt;br /&gt;
|| The '''Modify Layer''' dialog box appears.&lt;br /&gt;
|- &lt;br /&gt;
|| Uncheck the box “'''Visible'''” &amp;gt;&amp;gt; Click on the '''OK '''button.&lt;br /&gt;
|| Uncheck the box '''Visible''' and click on the '''OK '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Point that the objects are not visible.&lt;br /&gt;
|| The '''object'''s in '''Layer four''' are no longer visible.&lt;br /&gt;
&lt;br /&gt;
The '''object'''s  are present physically but are not visible on the '''Draw page.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the map.&lt;br /&gt;
|| We have our '''Map2'''!&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Pages pane''' &amp;gt;&amp;gt; point to the '''objects'''.&lt;br /&gt;
|| Notice that on the '''Pages''' pane on the left, all the '''object'''s are seen on the '''page'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click to view the context menu &amp;gt;&amp;gt; Select '''Modify Layer'''.&lt;br /&gt;
|| On the '''Draw '''page, right-click on '''Layer four tab.'''&lt;br /&gt;
&lt;br /&gt;
From the context menu, select '''Modify Layer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Visible''' check box &amp;gt;&amp;gt; click on the '''OK''' button.&lt;br /&gt;
&lt;br /&gt;
Point to the '''Draw ''' page.&lt;br /&gt;
|| Click the '''Visible''' checkbox and click on the '''OK''' button.&lt;br /&gt;
&lt;br /&gt;
This will make all the objects visible on the '''Draw''' '''page''' again.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click on Layout Layer to view the context menu &amp;gt;&amp;gt; Select '''Insert '''Layer.&lt;br /&gt;
|| Similarly, let’s create another new '''layer''' and name it as '''Layer five'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Type the '''Title''' as '''Map3'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type the '''Description''' as “'''This is the second new layer.”'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK '''button to exit the the dialog box.&lt;br /&gt;
|| I will type “'''Map3” '''as the '''Title'''.&lt;br /&gt;
&lt;br /&gt;
And then add a short text in the '''Description '''field, as shown here.&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK ''' button to exit the '''dialog''' box.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Layer five.'''&lt;br /&gt;
|| Notice that this layer appears before '''Layer four'''.&lt;br /&gt;
|- &lt;br /&gt;
|| In the Layout layer &amp;gt;&amp;gt; select '''Park'''.&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; Press '''Ctrl + X keys'''.&lt;br /&gt;
&lt;br /&gt;
|| In the '''Layout layer tab,''' select '''Park'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl + X''' keys to cut it.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + V''' to paste it&lt;br /&gt;
|| Click on '''Layer five tab '''and press '''Ctrl + V''' keys to paste it.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click to view the context menu &amp;gt;&amp;gt; Select '''Modify '''Layer.&lt;br /&gt;
|| Right-click on '''Layer five tab ''' to view the context menu and select '''Modify Layer'''.&lt;br /&gt;
&lt;br /&gt;
Uncheck the '''Visible''' checkbox and click on the '''OK''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to Map 3.&lt;br /&gt;
|| We have successfully created '''Map3'''!&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click to view the context menu &amp;gt;&amp;gt; Select '''Modify '''Layer.&lt;br /&gt;
|| Let us make all the objects visible again.&lt;br /&gt;
&lt;br /&gt;
Right-click on '''Layer five tab.'''&lt;br /&gt;
&lt;br /&gt;
From the context menu, select '''Modify Layer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Visible''' check box &amp;gt;&amp;gt; click on the '''OK''' button.&lt;br /&gt;
&lt;br /&gt;
Point to the '''Draw '''page&lt;br /&gt;
|| Click the '''Visible''' checkbox and then click on the '''OK''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Assignment'''&lt;br /&gt;
|| Pause this tutorial and do this '''assignment'''.&lt;br /&gt;
&lt;br /&gt;
* Create two new '''routes''' from '''Home '''to the '''School Campus''' in the '''RouteMap '''drawing.&lt;br /&gt;
* Display each '''route''' on a separate '''layer'''.&lt;br /&gt;
* Print the two '''maps '''each displaying only one '''route'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the '''Draw''' page.&lt;br /&gt;
|| Next, let’s display the dimension lines for the drawn objects.&lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''Layout layer tab'''&lt;br /&gt;
|| Click the '''Layout layer tab''' in the '''Draw '''page.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''Playground'''. &lt;br /&gt;
|| Let us show the dimension lines to measure the sides of the''' Playground.''' &lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''Lines and Arrows '''drop-down&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select '''Dimension Line '''icon.&lt;br /&gt;
|| Click on the '''Lines and Arrows '''drop-down.&lt;br /&gt;
&lt;br /&gt;
Select the '''Dimension Line '''tool.&lt;br /&gt;
|- &lt;br /&gt;
|| Move to the '''Draw''' page onto the '''Playground '''&amp;gt;&amp;gt; Place the cursor below the '''Playground '''at the left edge&lt;br /&gt;
&lt;br /&gt;
Drag it to the other end of the '''Playground'''. &lt;br /&gt;
&lt;br /&gt;
|| Move the cursor to the '''Draw''' page onto the '''Playground.'''&lt;br /&gt;
&lt;br /&gt;
The cursor changes to a plus sign.&lt;br /&gt;
&lt;br /&gt;
Place the cursor below or on the left edge and drag it to the other side.&lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''Lines and Arrows '''drop-down&lt;br /&gt;
&lt;br /&gt;
Select '''Dimension Line '''icon.&lt;br /&gt;
&lt;br /&gt;
Move to the '''Draw''' page onto the '''Playground '''&amp;gt;&amp;gt; Place the cursor below the '''Playground '''at the top edge&lt;br /&gt;
&lt;br /&gt;
Drag it to the bottom edge of the '''Playground'''.&lt;br /&gt;
|| Likewise, let’s draw a '''dimension line''' to measure its breadth''' '''also.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Save''' icon &amp;gt;&amp;gt; Click on the '''‘X’''' icon on the top right&lt;br /&gt;
|| Let’s save our '''RouteMap ''' file and close it.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide:''' '''Edit a PDF Document'''&lt;br /&gt;
|| Now we will learn to edit a '''PDF''' document in '''Draw'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this, let’s use the '''Resume.pdf''' file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This file is provided in the ''' Code files '''link.&lt;br /&gt;
|- &lt;br /&gt;
|| Open''' '''a new '''Draw''' file&lt;br /&gt;
|| I have open a new''' Draw''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''File''' menu and select '''Open.'''&lt;br /&gt;
&lt;br /&gt;
'''Open''' dialog box opens.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the ''' Resume.pdf''' file &amp;gt;&amp;gt; click on the '''Open''' button in the dialog box.&lt;br /&gt;
|| Click on the '''File''' menu and select '''Open'''.&lt;br /&gt;
&lt;br /&gt;
The '''Open''' dialog box appears.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the '''Resume.pdf''' file and click on the '''Open''' button in the dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the filename on the menu bar.&lt;br /&gt;
|| '''Resume.pdf''' file is loaded on the '''Draw''' page.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Let us add some more information to this '''resume'''.&lt;br /&gt;
|- &lt;br /&gt;
|| From the standard tool click on the''' Insert Text Box icon'''.&lt;br /&gt;
|| From the '''Standard toolbar''', click on the''' Insert Text Box''' icon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Draw a text box below '''MOTHER’s OCCUPATION. '''&lt;br /&gt;
|- &lt;br /&gt;
|| In the box type '''LANGUAGES KNOWN: ENGLISH, HINDI and MARATHI.'''&lt;br /&gt;
|| Inside the '''box''', type '''LANGUAGES KNOWN: ENGLISH, HINDI '''and '''MARATHI.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the double arrow icon.&lt;br /&gt;
&lt;br /&gt;
Select Font size and change it 14.&lt;br /&gt;
|| Now select all the text within the box and change the '''font size '''to '''14'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select text '''RESUME''' by double-clicking on it.&lt;br /&gt;
|| Now select the text '''RESUME''' by double-clicking on it.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the double arrow icon.&lt;br /&gt;
&lt;br /&gt;
Select the '''Font size''' and change it 14.&lt;br /&gt;
&lt;br /&gt;
Select the '''Font color''' and change it red.&lt;br /&gt;
&lt;br /&gt;
Click on underline icon.&lt;br /&gt;
|| Change the '''font size '''to 20 and the '''font''' colour to '''red'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then '''underline''' the text using the '''underline '''icon.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the '''Draw''' file.&lt;br /&gt;
|| Now we will add some work experience details, also.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the I'''nsert Text Box '''icon and draw a text box below '''HOBBIES'''.&lt;br /&gt;
|| Again, click on the '''Insert Text Box''' icon and draw another text box below''' HOBBIES. '''&lt;br /&gt;
|- &lt;br /&gt;
|| '''WORK EXPERIENCE: WORKING AS LECTURER IN ABC COLLEGE MUMBAI.'''&lt;br /&gt;
|| Inside this '''box,''' type the work experience details, as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Point below work experience.&lt;br /&gt;
|| Likewise, we can add other details as per our requirement to this '''PDF '''document. &lt;br /&gt;
|- &lt;br /&gt;
|| File &amp;gt;&amp;gt; '''Export as''' &amp;gt;&amp;gt; '''Export Directly as PDF''' &lt;br /&gt;
&lt;br /&gt;
Name '''Resume-modified.pdf'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Save''' button.&lt;br /&gt;
|| Let us export the file as Resume-modified.pdf&lt;br /&gt;
&lt;br /&gt;
and save on the '''Desktop'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''‘X’''' icon on the top right&lt;br /&gt;
|| Then save the file and close it.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the file on the '''Desktop'''.&lt;br /&gt;
&lt;br /&gt;
Right-click on the file and select '''Open With Document Viewer'''.&lt;br /&gt;
&lt;br /&gt;
|| Now we will open the '''PDF''' file saved on the '''Desktop'''.&lt;br /&gt;
&lt;br /&gt;
Right-click on the file and select '''Open With Document Viewer'''.&lt;br /&gt;
&lt;br /&gt;
You can open the file using any '''document viewer''' available on your system.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to all the new changes made.&lt;br /&gt;
|| Notice all the newly added information in the '''PDF '''document.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| This brings us to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Let us Summarize.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Summary'''&lt;br /&gt;
||  In this tutorial you have learnt to:&lt;br /&gt;
* Insert and modify '''layers'''&lt;br /&gt;
* Show dimension lines on a drawn object&lt;br /&gt;
* Edit a '''PDF''' document&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Assignment'''&lt;br /&gt;
|| Here is an assignment for you.&lt;br /&gt;
&lt;br /&gt;
* Open the '''RouteMap '''file and export it as a '''PDF''' file.&lt;br /&gt;
* Open the '''PDF''' file in '''Draw'''.&lt;br /&gt;
* Insert a '''text box''' to show the title as “'''Route Map from Home to School'''”.&lt;br /&gt;
* Make the text '''bold''' and change the '''font size''' to 24.&lt;br /&gt;
* Align the text to the centre of the '''text box'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''About Spoken Tutorial Project'''&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Spoken tutorial workshops'''&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using Spoken Tutorials and give certificates.&lt;br /&gt;
* For more details, please contact us.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Forums'''&lt;br /&gt;
|| Please post your timed queries in this forum.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Acknowledgement'''&lt;br /&gt;
|| The '''Spoken Tutorial''' project is funded by the Ministry of Education, Govt. of India.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Thank you'''&lt;br /&gt;
|| This tutorial was originally contributed by '''DesiCrew Solutions Pvt. Ltd''' in 2011. &lt;br /&gt;
&lt;br /&gt;
This tutorial is contributed by Nikita Misal and Madhuri Ganapathi from IIT Bombay. &lt;br /&gt;
&lt;br /&gt;
Thank you for watching.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C2/Overview-of-JavaScript/English</id>
		<title>JavaScript/C2/Overview-of-JavaScript/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C2/Overview-of-JavaScript/English"/>
				<updated>2021-07-23T11:01:40Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script: '''JavaScript Overview&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
'''Domain Reviewer: '''&lt;br /&gt;
&lt;br /&gt;
'''Novice Reviewer:''' &lt;br /&gt;
&lt;br /&gt;
'''Keywords: '''JavaScript, ECMAScript, JS, ES6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|  &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|  &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Slide: Title&lt;br /&gt;
|  Hello and welcome to the Spoken Tutorial on “Overview of '''JavaScript'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|  In this tutorial we will learn:&lt;br /&gt;
&lt;br /&gt;
* Why '''JavaScript?'''&lt;br /&gt;
* About '''JavaScript'''&lt;br /&gt;
* The content available in various tutorials in this series.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Slide: Prerequisites for using '''JavaScript'''&lt;br /&gt;
|  To work with '''JavaScript,''' we need-&lt;br /&gt;
&lt;br /&gt;
* A '''text editor, '''in which to write and understand the '''JavaScript code '''and&lt;br /&gt;
* A '''web browser'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Slide 4: '''For the recording of the JavaScript series'''&lt;br /&gt;
|  Throughout this series I will be using:&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
* '''Firefox''' web browser&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Slide: '''JavaScript'''&lt;br /&gt;
|  '''JavaScript''' is a living language, which is constantly evolving with new features.&lt;br /&gt;
&lt;br /&gt;
Today, '''JavaScript '''is very popular because we can develop&lt;br /&gt;
&lt;br /&gt;
* Web applications&lt;br /&gt;
* Mobile applications (windows, android and IOS)&lt;br /&gt;
* Desktop applications, &lt;br /&gt;
* Virtual Reality applications and &lt;br /&gt;
* Do a lot more with this language.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Slide: Why '''JavaScript?'''&lt;br /&gt;
|  Let’s go back 25 years and understand how this language evolved.&lt;br /&gt;
&lt;br /&gt;
Apart from '''Internet Explorer''', '''Netscape Navigator''' was the only available '''browser''' in the early 90s.&lt;br /&gt;
&lt;br /&gt;
'''Browsers''' were supporting only static content with '''HTML '''and '''CSS'''. &lt;br /&gt;
&lt;br /&gt;
Everyone was using the '''web''' to just read information like how we read newspapers.&lt;br /&gt;
&lt;br /&gt;
There was no support for actions in the '''browser'''.&lt;br /&gt;
&lt;br /&gt;
So to make the '''web''' and '''browser''' better, '''JavaScript '''was introduced.&lt;br /&gt;
&lt;br /&gt;
Using '''JavaScript''', users were able to interact more on the '''web'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  '''Slide: ECMAScript'''&lt;br /&gt;
|  '''ECMAScript '''is a standard for '''scripting languages''' such as '''JavaScript, JScript''', etc. &lt;br /&gt;
&lt;br /&gt;
It is a trademark '''scripting language''' specification.&lt;br /&gt;
&lt;br /&gt;
'''ECMAScript '''ensures the interoperability of '''web pages''' across different '''web browsers'''.&lt;br /&gt;
&lt;br /&gt;
Until 2015, there were no proper '''JavaScript '''new feature release cycles. &lt;br /&gt;
&lt;br /&gt;
In 2015, massive features were introduced, which were released as '''ECMAScript 6 '''popularly called '''ES6'''.&lt;br /&gt;
&lt;br /&gt;
From then, every year new features were added and released every year as '''ES7, ES8, ES9'''… and so on.&lt;br /&gt;
&lt;br /&gt;
In this tutorial series, we would be covering '''ES6 '''and above '''language standards'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  &lt;br /&gt;
|  Now, we will briefly go through some of the individual tutorials in this series.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of How to use JS in HTML&lt;br /&gt;
|  In this tutorial, we will learn how to write '''JS code''' for an '''HTML '''file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Data Types and Variables in JS&lt;br /&gt;
|  In the next tutorial, we will learn about different '''data types''' available in '''JS.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Operators in JS&lt;br /&gt;
|  In this tutorial, We will learn about the different types of '''operators.'''&lt;br /&gt;
&lt;br /&gt;
Such as arithmetic, logical, relational and other available operators in '''JS.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Loops in JS&lt;br /&gt;
|  In the '''Loops '''tutorial, we will learn about the standard '''loops '''and their '''syntax''' in '''JS.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Functions in JS&lt;br /&gt;
|  In the next tutorial, we will learn about the different types of '''functions''', their '''syntax''' and usage in '''JS.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Window and DOM Manipulations in JS&lt;br /&gt;
|  In this tutorial, we will learn about the '''window object'''.&lt;br /&gt;
&lt;br /&gt;
We will also learn how to manipulate '''DOM '''elements with the help of the '''window object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Events and Event Listeners in JS&lt;br /&gt;
|  In this tutorial, we will learn about '''Events.'''&lt;br /&gt;
&lt;br /&gt;
We will also understand the usage of '''event listeners''' on '''HTML '''elements.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Variable Keywords and Hoisting in JS&lt;br /&gt;
|  In this tutorial, we will learn about the different types of '''variable keywords''' available in '''JS'''.&lt;br /&gt;
&lt;br /&gt;
And, learn about their '''scopes '''and '''hoisting''' in '''JS'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Closure in JS&lt;br /&gt;
|  In this tutorial, we will learn about the '''closure scope.'''&lt;br /&gt;
&lt;br /&gt;
We’ll learn how to see the '''closure scope''' values in the '''function''' and their usage with examples.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Object and Array Destructuring in JS&lt;br /&gt;
|  This tutorial will teach us about '''objects''' and '''array destructing''' in '''JS.'''&lt;br /&gt;
&lt;br /&gt;
Along with that, we will be covering '''template literals''' and usage of the '''spread operator.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of this keyword in JS&lt;br /&gt;
|  The next tutorial will teach us about '''this keyword''' and their different types of '''bindings''' in detail.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Arrow Function in JS&lt;br /&gt;
|  In this tutorial, we will learn about '''Arrow function''' with an example.&lt;br /&gt;
&lt;br /&gt;
Then, we will learn more examples to understand the usage of '''setTimeout '''and '''setInterval.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Array Methods in JS&lt;br /&gt;
|  In this tutorial, we will be walking through some of the basic methods for manipulating the '''array'''.&lt;br /&gt;
&lt;br /&gt;
And, we will even look into some of the advanced '''array loops''' like '''forEach''', '''map '''and '''filter.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Classes and Inheritance in JS&lt;br /&gt;
|  This tutorial teaches about '''class''', '''constructor''', '''super keyword''' and '''inheritance '''in '''JS '''with examples.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Promise and Async-Await in JS&lt;br /&gt;
|  In this tutorial, we will learn about '''Promise''' and the different states of a '''promise'''.&lt;br /&gt;
&lt;br /&gt;
Also, we’ll learn how to use a '''promise '''and its advantages.&lt;br /&gt;
&lt;br /&gt;
Then we’ll see how to chain '''promise '''and how to handle multiple '''promise execution''' with '''async-await.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Fetch API in JS&lt;br /&gt;
|  In this tutorial, we will learn how to fetch real-time '''GitHub user data'''.&lt;br /&gt;
&lt;br /&gt;
We will learn this with a sample '''GitHub URL''' and display in the '''browser'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Glimpse of Project GitHb Repos in JS&lt;br /&gt;
|  In this tutorial, we will learn how to take the '''input''' from the '''user'''.&lt;br /&gt;
&lt;br /&gt;
And, then it will fetch the '''repo details''' of the '''GitHub user''' for the entered '''user input'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Only narration&lt;br /&gt;
|  With this, we come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
Let us summarise.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  Slide: Summary&lt;br /&gt;
|  In this tutorial, we have learnt about:&lt;br /&gt;
&lt;br /&gt;
* Why '''JavaScript'''&lt;br /&gt;
* '''ECMAScript '''and &lt;br /&gt;
* The content available in various tutorials in this series&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Slide: About Spoken Tutorial Project&lt;br /&gt;
| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Slide: Spoken tutorial workshops&lt;br /&gt;
| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Slide: Answers for THIS Spoken Tutorial&lt;br /&gt;
| &lt;br /&gt;
* Do you have questions in THIS Spoken Tutorial?&lt;br /&gt;
* Please visit this site.&lt;br /&gt;
* Choose the minute and second where you have the question.&lt;br /&gt;
* Explain your question briefly.&lt;br /&gt;
* The Spoken Tutorial project will ensure an answer.&lt;br /&gt;
* You will have to register to ask questions.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Slide : Forum for specific questions&lt;br /&gt;
| &lt;br /&gt;
* The Spoken Tutorial forum is for specific questions on this tutorial.&lt;br /&gt;
* Please do not post unrelated and general questions on them.&lt;br /&gt;
* This will help reduce the clutter.&lt;br /&gt;
* With less clutter, we can use these discussions as instructional material.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Slide: Acknowledgement&lt;br /&gt;
| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Slide: Thanks&lt;br /&gt;
| The script for this tutorial is contributed by Jayesh.&lt;br /&gt;
&lt;br /&gt;
And this is Praveen signing off. &lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C2/Overview-of-JavaScript/English</id>
		<title>JavaScript/C2/Overview-of-JavaScript/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C2/Overview-of-JavaScript/English"/>
				<updated>2021-07-23T10:41:27Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: Created page with &amp;quot;1&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;1&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/DSpace</id>
		<title>DSpace</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/DSpace"/>
				<updated>2021-07-19T14:24:18Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;DSpace is a free and open source repository software package, generally used for creating and managing repositories of digital content. DSpace is very useful as an Institutional Repository. DSpace is developed by joint efforts between MIT and HP Labs. Currently, DuraSpace leads the updates and enhancements of DSpace software. Basically, DSpace is a digital archival system which has the best features of content management systems and document management systems. DSpace is used for long-term storage, access and preservation of digital content. It runs on operating systems such as Linux, Ubuntu, Solaris, Windows and Unix. Important features of DSpace: Free and open source software Completely customizable repository to fit user needs Manage and preserve all format of digital content Apache SOLR based search for metadata and full text contents UTF-8 Support Interface available in many languages Granular group based access control, allowing setting permissions down to the level of individual files Optimized for Google Scholar indexing Integration with systems like BASE, CORE, OpenAIRE, Unpaywall and WorldCat User Interface available in JSPUI and XMLUI REST APIs available for integration with other applications. &lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
===Basic Level===&lt;br /&gt;
&lt;br /&gt;
# Overview of DSpace&lt;br /&gt;
#* About DSpace&lt;br /&gt;
#* Features of DSpace&lt;br /&gt;
#* Usage of DSpace&lt;br /&gt;
#* Notable DSpace Repositories&lt;br /&gt;
#* Dublin Core Metadata Standard&lt;br /&gt;
#* DC Elements&lt;br /&gt;
#* The content available in various tutorials in this series&lt;br /&gt;
#* DSpace Installation and Customization on Windows 10&lt;br /&gt;
#* DSpace Installation and Customization on Ubuntu Linux OS 18.04&lt;br /&gt;
#* Common Tutorials on using Dspace as Digital Repository&lt;br /&gt;
==== DSpace Installation and Configuration on Windows 10 ====&lt;br /&gt;
# Install JDK and Build tools on Windows 10&lt;br /&gt;
#* Install software packages&lt;br /&gt;
#* JDK8 Maven 3.6.3&lt;br /&gt;
#* Ant 1.10.9&lt;br /&gt;
#* Git 2.29.2.2&lt;br /&gt;
#* Set Environment and Path Variables&lt;br /&gt;
#* JDK8&lt;br /&gt;
#* Maven 3.6.3&lt;br /&gt;
#* Ant 1.10.9&lt;br /&gt;
#* Verification of Environment and Path Variables&lt;br /&gt;
# Setting up Tomcat and Postgresql on Windows 10&lt;br /&gt;
#* Download Tomcat8&lt;br /&gt;
#* Installation of Tomcat8&lt;br /&gt;
#* Configuration of Tomcat8&lt;br /&gt;
#* Download Postgresql 11.10&lt;br /&gt;
#* Installation of Postgresql 11.10&lt;br /&gt;
#* Connect to database server using PgAdmin4&lt;br /&gt;
#* Create dspace database user&lt;br /&gt;
#* Create dspace database&lt;br /&gt;
#* Set dspace database owner&lt;br /&gt;
#* Create pgcrypto extension for dspace database&lt;br /&gt;
# DSpace Installation on Windows 10 OS&lt;br /&gt;
#* Download DSpace source code&lt;br /&gt;
#* Set Sever configurations&lt;br /&gt;
#* Set Database configuration&lt;br /&gt;
#* Build DSpace source code&lt;br /&gt;
#* DSpace installation&lt;br /&gt;
#* Create DSpace administrator&lt;br /&gt;
#* Deploy DSpace on tomcat server&lt;br /&gt;
#* Verify DSpace installation&lt;br /&gt;
#* Create DSpace administrator account&lt;br /&gt;
#* DSpace administrator login&lt;br /&gt;
# Email Configuration for DSpace on Windows OS&lt;br /&gt;
#* Need of Email settings&lt;br /&gt;
#* SMTP Services&lt;br /&gt;
#* Configuration of Email settings in dspace.cfg file&lt;br /&gt;
#* mail.server&lt;br /&gt;
#* mail credentials&lt;br /&gt;
#* mail.server.port&lt;br /&gt;
#* Valid emails for from address, feedback&lt;br /&gt;
#* Batch script for DSpace Rebuild&lt;br /&gt;
#* Enable less secure app access&lt;br /&gt;
#* Send test email&lt;br /&gt;
# Customization of DSpace home page (on Windows 10)&lt;br /&gt;
#* Sections of DSpace Home page&lt;br /&gt;
#* Changing logos&lt;br /&gt;
#* Navigation bar logo&lt;br /&gt;
#* Banner logo&lt;br /&gt;
#* Properties of logos&lt;br /&gt;
#* Edit Messages.Properties file&lt;br /&gt;
#* Edit banner text&lt;br /&gt;
#* Styling of UI Text&lt;br /&gt;
#* Edit top news&lt;br /&gt;
#* Edit sidebar news&lt;br /&gt;
==== DSpace Installation and Configuration on Ubuntu Linux 18.04 ==== &lt;br /&gt;
# Getting ready for DSpace Installation&lt;br /&gt;
#* Hardware requirements for DSpace&lt;br /&gt;
#* System Update&lt;br /&gt;
#* Create new system user - dspace&lt;br /&gt;
#* Installation of openjdk 8&lt;br /&gt;
#* Installation of git, maven and ant&lt;br /&gt;
#* Installation and configuration of Tomcat 8&lt;br /&gt;
#* Installation of postgresql 10&lt;br /&gt;
#* Configuration of postgresql&lt;br /&gt;
#* Create dspace database&lt;br /&gt;
#* Set directory and file permissions&lt;br /&gt;
# DSpace Installation on Ubuntu Linux OS&lt;br /&gt;
#* Download DSpace source code&lt;br /&gt;
#* Set Sever configurations&lt;br /&gt;
#* Set Database configurations&lt;br /&gt;
#* Build DSpace source code&lt;br /&gt;
#* DSpace installation&lt;br /&gt;
#* Create DSpace administrator&lt;br /&gt;
#* Deploy DSpace on tomcat server&lt;br /&gt;
#* Verify DSpace installation&lt;br /&gt;
#* Create DSpace administrator account&lt;br /&gt;
#* DSpace administrator login&lt;br /&gt;
# Email configuration for DSpace&lt;br /&gt;
#* Need of Email settings&lt;br /&gt;
#* SMTP Services&lt;br /&gt;
#* Configuration of Email settings in dspace.cfg file&lt;br /&gt;
#* Mail.server&lt;br /&gt;
#* mail credentials&lt;br /&gt;
#* Mail.server.port&lt;br /&gt;
#* Valid emails for from address, feedback&lt;br /&gt;
#* Shell script for DSpace Rebuild&lt;br /&gt;
#* Enable less secure app access&lt;br /&gt;
#* Send test email&lt;br /&gt;
# Customization of DSpace Home page on Ubuntu Linux OS&lt;br /&gt;
#* Sections of Home page&lt;br /&gt;
#* Changing logos&lt;br /&gt;
#* Navigation bar logo&lt;br /&gt;
#* Banner logo&lt;br /&gt;
#* Properties of logos&lt;br /&gt;
#* Edit Messages.Properties file&lt;br /&gt;
#* Edit banner text&lt;br /&gt;
#* Styling of UI Text&lt;br /&gt;
#* Edit top news&lt;br /&gt;
#* Edit sidebar news&lt;br /&gt;
==== DSpace common tutorials for Ubuntu Linux &amp;amp; Windows ==== &lt;br /&gt;
# User Registration in DSpace&lt;br /&gt;
#* Email verification of anonymous user&lt;br /&gt;
#* User registration&lt;br /&gt;
#* Edit user profile&lt;br /&gt;
#* Roles in DSpace&lt;br /&gt;
#* EPerson&lt;br /&gt;
#* Administrator&lt;br /&gt;
#* Anonymous user&lt;br /&gt;
#* Community administrator&lt;br /&gt;
#* Collection administrator&lt;br /&gt;
#* Submitter&lt;br /&gt;
#* Reviewer&lt;br /&gt;
# Managing DSpace user accounts&lt;br /&gt;
#* Manage EPersons&lt;br /&gt;
#* Register EPerson&lt;br /&gt;
#* Edit EPerson&lt;br /&gt;
#* Delete EPerson&lt;br /&gt;
#* Groups in DSpace&lt;br /&gt;
#* Authority of Groups&lt;br /&gt;
#* Default and Custom Groups&lt;br /&gt;
#* Create Group&lt;br /&gt;
#* Manage Group&lt;br /&gt;
#* Add EPerson to Group&lt;br /&gt;
#* Remove EPerson from Group&lt;br /&gt;
# Create Community and Sub-community in DSpace&lt;br /&gt;
#* Community in DSpace&lt;br /&gt;
#* Community Metadata&lt;br /&gt;
#* Manage Community&lt;br /&gt;
#* Create Community&lt;br /&gt;
#* Edit Community&lt;br /&gt;
#* Delete Community&lt;br /&gt;
#* Admin Tools&lt;br /&gt;
#* Create Sub-community&lt;br /&gt;
#* Community Administrator&lt;br /&gt;
#* Verify Community&lt;br /&gt;
#* Verify Sub-community&lt;br /&gt;
# Create Collection in DSpace&lt;br /&gt;
#* Collection in DSpace&lt;br /&gt;
#* Collection Metadata&lt;br /&gt;
#* Item Submission Workflow&lt;br /&gt;
#* Manage Collection&lt;br /&gt;
#* Create Collection&lt;br /&gt;
#* Edit Collection&lt;br /&gt;
#* Delete Collection&lt;br /&gt;
#* Item Submission Authorization&lt;br /&gt;
#* Item Review Authorization&lt;br /&gt;
#* Collection Administrator&lt;br /&gt;
# Item Submission in DSpace&lt;br /&gt;
#* Item in DSpace&lt;br /&gt;
#* Metadata for Item&lt;br /&gt;
#* Item submission&lt;br /&gt;
#* Enter Metadata&lt;br /&gt;
#* File upload for Item&lt;br /&gt;
#* Verify uploaded files&lt;br /&gt;
#* Verify metadata&lt;br /&gt;
#* Distribution License&lt;br /&gt;
#* Item submission status&lt;br /&gt;
#* New task notification to Reviewers&lt;br /&gt;
# Item Review in DSpace&lt;br /&gt;
#* Need for Item review&lt;br /&gt;
#* Task Pool of Reviewer&lt;br /&gt;
#* Accept Task&lt;br /&gt;
#* Item Review Options&lt;br /&gt;
#* Accept Item&lt;br /&gt;
#* Reject Item&lt;br /&gt;
#* Edit Metadata&lt;br /&gt;
#* Return Task to Pool&lt;br /&gt;
#* Do Later&lt;br /&gt;
#* Notifications to Item submitter&lt;br /&gt;
#* Item Submission Dashboard for Submitter&lt;br /&gt;
# Batch Import of items&lt;br /&gt;
#* Batch import methodology&lt;br /&gt;
#* SAFBuilder&lt;br /&gt;
#* SAF file structure&lt;br /&gt;
#* Set up SAFBuilder&lt;br /&gt;
#* Metadata in CSV format&lt;br /&gt;
#* Create SAF file for Items&lt;br /&gt;
#* Upload SAF file in the Collection&lt;br /&gt;
#* Verify status of Batch Jobs&lt;br /&gt;
#* Mapfile- Mapping of items and Handle number&lt;br /&gt;
#* Remove batch uploaded files&lt;br /&gt;
#* Access Items uploaded in Batch&lt;br /&gt;
# Searching Items in DSpace&lt;br /&gt;
#* Item Search in DSpace&lt;br /&gt;
#* Browse in DSpace&lt;br /&gt;
#* Browse Items by Issue Date&lt;br /&gt;
#* Browse Items by Author&lt;br /&gt;
#* Browse Items by Title&lt;br /&gt;
#* Browse Items by Subject&lt;br /&gt;
#* Search in DSpace&lt;br /&gt;
#* Search filters&lt;br /&gt;
#* Search Scope in DSpace&lt;br /&gt;
#* DSpace Discovery&lt;br /&gt;
#* Facets in DSpace&lt;br /&gt;
&lt;br /&gt;
=== Intermediate Level ===&lt;br /&gt;
&lt;br /&gt;
# Item Submission Configuration&lt;br /&gt;
#* Embargo in DSpace&lt;br /&gt;
#* item-submission.xml file&lt;br /&gt;
#* Configuration for Embargo&lt;br /&gt;
#* Item Submission with Embargo&lt;br /&gt;
#* Review of Item with Embargo&lt;br /&gt;
#* Access of Item with Embargo&lt;br /&gt;
#* Configure Item submission without a file&lt;br /&gt;
#* dspace.cfg file&lt;br /&gt;
#* Item submission without a file&lt;br /&gt;
#* Review of Item without a file&lt;br /&gt;
# General Settings in DSpace&lt;br /&gt;
#* Searching Items in DSpace&lt;br /&gt;
#* Metadata indexing of Items&lt;br /&gt;
#* Full text indexing of Items&lt;br /&gt;
#* Role of Media filters&lt;br /&gt;
#* Running Media filters&lt;br /&gt;
#* Generate a thumbnails&lt;br /&gt;
#* User Interface language switcher&lt;br /&gt;
#* Localize DSpace UI&lt;br /&gt;
#* Messages.properties file&lt;br /&gt;
#* Translation of Messages.properties file&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript</id>
		<title>JavaScript</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript"/>
				<updated>2021-07-19T09:15:49Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: Created page with &amp;quot;JavaScript, often abbreviated as JS, is a programming language that conforms to the ECMA Script specification. Alongside HTML and CSS, JavaScript is one of the core technologi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;JavaScript, often abbreviated as JS, is a programming language that conforms to the ECMA Script specification. Alongside HTML and CSS, JavaScript is one of the core technologies of the World Wide Web. JavaScript enables interactive web pages and is an essential part of web applications. The vast majority of websites use it for client-side page behavior, and all major web browsers have a dedicated JavaScript engine to execute it. &lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=== Basic Level ===&lt;br /&gt;
&lt;br /&gt;
#Overview of JS&lt;br /&gt;
#* Why JavaScript?&lt;br /&gt;
#* About JavaScript&lt;br /&gt;
#* The content available in various tutorials in this series&lt;br /&gt;
#How to use JS in HTML&lt;br /&gt;
#* Creating JS file&lt;br /&gt;
#* Different approaches to use JS with HTML&lt;br /&gt;
#* Script Tag Usage&lt;br /&gt;
#* Embedding JS in HTML&lt;br /&gt;
#* Writing JS code in Embedded method&lt;br /&gt;
#* Importing External JS File&lt;br /&gt;
#* Writing JS code in External File&lt;br /&gt;
#* Best Practices for writing JS code&lt;br /&gt;
#* Installing Live Server&lt;br /&gt;
#* Browser Console&lt;br /&gt;
#* Browser Tools&lt;br /&gt;
#Data Types and Variables in JS&lt;br /&gt;
#* Declaring Variables&lt;br /&gt;
#* Data Types&lt;br /&gt;
#* Primitive Data Types&lt;br /&gt;
#* Non-Primitive Data Types&lt;br /&gt;
#* Browser Tools&lt;br /&gt;
#* Console Data&lt;br /&gt;
#* Commenting JS code&lt;br /&gt;
#* The data structure of Array and Object&lt;br /&gt;
#* Accessing Array Elements&lt;br /&gt;
#* Accessing Object Property Values&lt;br /&gt;
#Operators in JS&lt;br /&gt;
#* Operator&lt;br /&gt;
#* Different Types of Operators&lt;br /&gt;
#* What Operator returns&lt;br /&gt;
#* Assignment operator&lt;br /&gt;
#* Arithmetic operators&lt;br /&gt;
#* Comparison operators&lt;br /&gt;
#* Logical operators&lt;br /&gt;
#* Ternary operator&lt;br /&gt;
#* Usage or Operators&lt;br /&gt;
#Loops in JS&lt;br /&gt;
#* What is a Loop&lt;br /&gt;
#* Different Types of Loops&lt;br /&gt;
#* Initializing Loops&lt;br /&gt;
#* Entry Controlled Loops&lt;br /&gt;
#* Exit controlled Loops&lt;br /&gt;
#* Increment/Decrement in Loops&lt;br /&gt;
#* for loop&lt;br /&gt;
#* while loop&lt;br /&gt;
#* do.. while loop&lt;br /&gt;
#* for.. in loop&lt;br /&gt;
#Functions in JS&lt;br /&gt;
#* Create basic functions&lt;br /&gt;
#* Create Parameterized function&lt;br /&gt;
#* Create Function as a value&lt;br /&gt;
#* Create Function as an Argument/Parameter&lt;br /&gt;
#* Create Function as Property&lt;br /&gt;
#* Create Function Arguments&lt;br /&gt;
#* Create Constructor function&lt;br /&gt;
#* Access parameters in a function&lt;br /&gt;
#* Returning value from a function&lt;br /&gt;
#* Access arguments in a function&lt;br /&gt;
&lt;br /&gt;
=== Intermediate Level ===&lt;br /&gt;
&lt;br /&gt;
#Window and DOM Manipulations in JS&lt;br /&gt;
#* Window Object&lt;br /&gt;
#* Global Object&lt;br /&gt;
#* Window Object Properties&lt;br /&gt;
#* Prototypes&lt;br /&gt;
#* Document Object Modal&lt;br /&gt;
#* DOM Manipulations&lt;br /&gt;
#* Access element&lt;br /&gt;
#* Accessing element value&lt;br /&gt;
#* Modifying value&lt;br /&gt;
#* Adding HTML element to DOM&lt;br /&gt;
#Events and Event Listeners in JS&lt;br /&gt;
#* Event in JavaScript&lt;br /&gt;
#* Different Types of Event&lt;br /&gt;
#* Event Listeners&lt;br /&gt;
#* Adding Event Listeners to HTML elements&lt;br /&gt;
#* Removing Event Listeners to HTML elements &lt;br /&gt;
#* Adding Click Event to Button Example&lt;br /&gt;
#* Executing JavaScript Function on Event occurrence&lt;br /&gt;
#Variable Keywords and Hoisting in JS&lt;br /&gt;
#* Declaring variables using let and const Keywords&lt;br /&gt;
#* Scope of let Keyword&lt;br /&gt;
#* Scope of const Keyword&lt;br /&gt;
#* Variable value Manipulations&lt;br /&gt;
#* Usage of data types with let and const&lt;br /&gt;
#* Lexical Scope&lt;br /&gt;
#* Block Scope&lt;br /&gt;
#* Functional Scope&lt;br /&gt;
#* Hoisting&lt;br /&gt;
#Closure in JS&lt;br /&gt;
#* Closure Scope&lt;br /&gt;
#* Closure Function&lt;br /&gt;
#* Understanding Closure&lt;br /&gt;
#* Accessing Closure&lt;br /&gt;
#* Making use of Closure Scope values&lt;br /&gt;
#* Advantages of Closure&lt;br /&gt;
&lt;br /&gt;
=== Advance Level ===&lt;br /&gt;
&lt;br /&gt;
#Object and Array Destructuring in JS&lt;br /&gt;
#* Object Destructuring&lt;br /&gt;
#* Array Destructuring&lt;br /&gt;
#* Template Literals&lt;br /&gt;
#* String Concatenation&lt;br /&gt;
#* Spread Operator&lt;br /&gt;
#* Copying array values&lt;br /&gt;
#* Rest Operator&lt;br /&gt;
#* Assigning a different variable name while Destructuring&lt;br /&gt;
#this Keyword in JS&lt;br /&gt;
#* this Keywords&lt;br /&gt;
#* this Context&lt;br /&gt;
#* Different types of bindings&lt;br /&gt;
#* Implicit Binding&lt;br /&gt;
#* Explicit Binding&lt;br /&gt;
#* New Binding&lt;br /&gt;
#* Constructor Function&lt;br /&gt;
#* Window Binding&lt;br /&gt;
#* Window Object&lt;br /&gt;
#Arrow function in JS&lt;br /&gt;
#* Arrow Function&lt;br /&gt;
#* Fat Arrow Function&lt;br /&gt;
#* Difference between normal function and arrow function&lt;br /&gt;
#* Advantages of arrow function&lt;br /&gt;
#* setTimeout example&lt;br /&gt;
#* setInterval example&lt;br /&gt;
#* clearInterval example&lt;br /&gt;
#* callback&lt;br /&gt;
#* this context&lt;br /&gt;
#Array methods in JS&lt;br /&gt;
#* Different Type of Array Methods&lt;br /&gt;
#* The widely used array method&lt;br /&gt;
#* adding and removing elements from the beginning of the array&lt;br /&gt;
#* adding and removing elements from the end of the array&lt;br /&gt;
#* Advanced Loops for Array&lt;br /&gt;
#* looping using forEach method&lt;br /&gt;
#* modifying the array using the map method&lt;br /&gt;
#* filtering the array using the filter method&lt;br /&gt;
#Classes and Inheritance in JS&lt;br /&gt;
#* How to create a Class&lt;br /&gt;
#* How to inherit properties and methods of a class&lt;br /&gt;
#* Constructor Function&lt;br /&gt;
#* Invoking Parent class constructor&lt;br /&gt;
#* Super Keyword&lt;br /&gt;
#* Creating Object for a class&lt;br /&gt;
#* Passing variables from child to parent class&lt;br /&gt;
#Promise and Async-Await in JS&lt;br /&gt;
#* How to create a promise&lt;br /&gt;
#* Promise States&lt;br /&gt;
#* Handling success and Failure in Promise&lt;br /&gt;
#* Handling success and failure callbacks&lt;br /&gt;
#* throwing an exception from a function&lt;br /&gt;
#* Chaining in Promise&lt;br /&gt;
#* Async Function and usage&lt;br /&gt;
#* Await Keyword and usage&lt;br /&gt;
#Fetch API in JS&lt;br /&gt;
#* How to use fetch&lt;br /&gt;
#* Handling success and failure response&lt;br /&gt;
#* Handling success and failure callbacks&lt;br /&gt;
#* Making an API call using fetch&lt;br /&gt;
#* Getting real-time data using fetch&lt;br /&gt;
#* convert the headers and get a response&lt;br /&gt;
#* Accessing the response data&lt;br /&gt;
#Project: Github Repos&lt;br /&gt;
#* Fetching GitHub repo data&lt;br /&gt;
#* Handling success and failure response&lt;br /&gt;
#* Handling success and failure callbacks&lt;br /&gt;
#* Making an API call using fetch&lt;br /&gt;
#* Getting real-time data using fetch&lt;br /&gt;
#* convert the headers and get a response&lt;br /&gt;
#* Accessing the response data&lt;br /&gt;
#* Converting JSON response to a string&lt;br /&gt;
#* Displaying data in DOM&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/CSS</id>
		<title>CSS</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/CSS"/>
				<updated>2021-07-19T08:58:36Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheet (CSS) is a style sheet language used to style documents written in a markup language like HTML and XML. It allows developers to control how the webpage should be displayed by applying styles ( e.g color, font, space). Before CSS, all the styles and formatting were explicitly defined within HTML. Due to this, the creation of large websites became a long and expensive process. This is because, for every single page, style information has to be added repeatedly. For the solution of this problem, the World Wide Consortium (W3C) introduced CSS in 1996. CSS file is an independent file and is saved with [dot] CSS (.css) extension. Now developers can write the style information of the web pages to a separate style sheet. The separation of HTML and CSS i.e content and styling, makes it easier to maintain sites, improves content accessibility, share style sheets across pages and provides more flexibility. CSS3 is the latest version of the Cascading Style Sheets language and extends CSS2.1. It has several new features like shadows, gradients, rounded corners transitions or animations, and new layouts like a multi-columns, flexible box or grid layouts. The CSS specifications are maintained by the World Wide Consortium (W3C). The latest snapshot of CSS published by it is available at https://www.w3.org/TR/css-2018&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=== Basic Level ===&lt;br /&gt;
&lt;br /&gt;
#Overview of CSS&lt;br /&gt;
#* CSS Overview&lt;br /&gt;
#* About CSS&lt;br /&gt;
#* The content available in various tutorials in this series&lt;br /&gt;
# First CSS File&lt;br /&gt;
#* Create a CSS file&lt;br /&gt;
#* Syntax of CSS to write a style&lt;br /&gt;
#* Types of Selectors&lt;br /&gt;
#* About Declaration &lt;br /&gt;
#* Save the CSS file in a folder&lt;br /&gt;
#* Link a CSS file with an HTML file&lt;br /&gt;
#* Descendant Selector with example&lt;br /&gt;
#* Grouping Selector with example&lt;br /&gt;
#* Universal Selector with example&lt;br /&gt;
#* Id Selector with example&lt;br /&gt;
#* Class Selector with example&lt;br /&gt;
#Dimensions and Measuring Units in CSS&lt;br /&gt;
#* What are measuring Units&lt;br /&gt;
#* What are relative Units&lt;br /&gt;
#* What are absolute Units&lt;br /&gt;
#* Setting width using percentage &lt;br /&gt;
#* Setting font size using percentage&lt;br /&gt;
#* Setting font size using points&lt;br /&gt;
#* Setting height using centimetre&lt;br /&gt;
#* Setting properties for paragraph&lt;br /&gt;
#* Setting properties for heading&lt;br /&gt;
#* What are heading tag sizes&lt;br /&gt;
#Box Model in CSS&lt;br /&gt;
#* What is Box Model&lt;br /&gt;
#* Setting border using properties: Style, Width, Color&lt;br /&gt;
#* Setting different border styles for each side&lt;br /&gt;
#* Setting margin&lt;br /&gt;
#* Setting different margins for each side&lt;br /&gt;
#* Setting Padding&lt;br /&gt;
#* Setting properties for division tag&lt;br /&gt;
#Background in CSS&lt;br /&gt;
#* What are background properties&lt;br /&gt;
#* How to style background&lt;br /&gt;
#* Setting background-color using:&lt;br /&gt;
#** Color names&lt;br /&gt;
#** Hexadecimal values&lt;br /&gt;
#** RGB values&lt;br /&gt;
#* Setting background image&lt;br /&gt;
#* Setting background-repeat property&lt;br /&gt;
#* Setting background-attachment property&lt;br /&gt;
#* Setting background-position property&lt;br /&gt;
#* Styling background using shorthand&lt;br /&gt;
#Text Properties in CSS&lt;br /&gt;
#* Format and style text elements&lt;br /&gt;
#* Use of color names, hexadecimal values and RGB values to set the text color &lt;br /&gt;
#* Align the text horizontally using left, right, center and justify options&lt;br /&gt;
#* Indent the text using the length values - cm, px, and  %&lt;br /&gt;
#* Change the letter spacing and word spacing of the text&lt;br /&gt;
#* Set the line height of the text &lt;br /&gt;
#* Set the direction property using ltr and rtl values&lt;br /&gt;
#* Transform the text using values &lt;br /&gt;
#* Decorate the text &lt;br /&gt;
#* Apply shadow effect on the text&lt;br /&gt;
#Font Properties in CSS&lt;br /&gt;
#* Set the font-family property of the text&lt;br /&gt;
#* Style text font using the font-style property&lt;br /&gt;
#* Use of font-style values - normal, italic &amp;amp; oblique&lt;br /&gt;
#* Specify the thickness of the font&lt;br /&gt;
#* Use of font-weight values  - keywords &amp;amp; numeric&lt;br /&gt;
#* Vary the font text using the font-variant values - small caps and normal&lt;br /&gt;
#* Set the font size using points&lt;br /&gt;
#* Use of font-size values - length , keywords &amp;amp; percentage&lt;br /&gt;
#* Set the font properties using the shorthand method&lt;br /&gt;
#Display Property in CSS&lt;br /&gt;
#* Set the display property to present an element on the webpage&lt;br /&gt;
#* Use of display property values&lt;br /&gt;
#** Set the display property using -  Block, Inline,  None values&lt;br /&gt;
#* Create elements using an id selector.&lt;br /&gt;
#* Set height, width and background for the elements&lt;br /&gt;
#** Style the paragraphs&lt;br /&gt;
#* Remove the display property&lt;br /&gt;
#** Undo the changes in the files&lt;br /&gt;
&lt;br /&gt;
=== Intermediate Level ===&lt;br /&gt;
&lt;br /&gt;
#Float and Overflow in CSS&lt;br /&gt;
#* About float property&lt;br /&gt;
#* Use of float property values - left, right, none, initial &amp;amp; inherit&lt;br /&gt;
#* Add an image&lt;br /&gt;
#* Set float property for an image&lt;br /&gt;
#* About the clear property&lt;br /&gt;
#* Use of clear property values - left, right, both, none, initial &amp;amp; inherit&lt;br /&gt;
#* Set clear property for a paragraph&lt;br /&gt;
#* About overflow property&lt;br /&gt;
#* Use of overflow property values - visible, scroll, auto, hidden, initial &amp;amp; inherit&lt;br /&gt;
#* Set overflow property for a div block&lt;br /&gt;
#Link in CSS&lt;br /&gt;
#* About styling link&lt;br /&gt;
#* Add links to the webpage&lt;br /&gt;
#* About default property of link:&lt;br /&gt;
#** Underline&lt;br /&gt;
#** Color&lt;br /&gt;
#* About link states - link, visited, hover &amp;amp; active&lt;br /&gt;
#* Set color of the link&lt;br /&gt;
#* Set background color of the link&lt;br /&gt;
#* Set text-decoration of the link&lt;br /&gt;
#** Remove the underline of the link&lt;br /&gt;
#List in CSS&lt;br /&gt;
#* About list properties&lt;br /&gt;
#* Add an ordered list to the webpage&lt;br /&gt;
#* Add an unordered list to the webpage&lt;br /&gt;
#* Set the style of the marker for the ordered list&lt;br /&gt;
#* Set the shape of the marker for the unordered list&lt;br /&gt;
#* Set background color for the lists&lt;br /&gt;
#* Set background color for the list-items&lt;br /&gt;
#* Set an image as a marker for the unordered list&lt;br /&gt;
#* Set position of the marker for the lists&lt;br /&gt;
#* Set list properties using shorthand&lt;br /&gt;
#Table in CSS&lt;br /&gt;
#* About table properties&lt;br /&gt;
#* Add a table to the webpage&lt;br /&gt;
#* Set border for the table&lt;br /&gt;
#* Set width of the table&lt;br /&gt;
#* Set height of the table&lt;br /&gt;
#* Set horizontal alignment for the text inside the table&lt;br /&gt;
#* Set vertical alignment for the text inside the table&lt;br /&gt;
#* Set padding for the text inside the table&lt;br /&gt;
#* Set text color and background color for the table&lt;br /&gt;
#* Set position of the caption of a table&lt;br /&gt;
#Advanced Table Design in CSS&lt;br /&gt;
#* About table design&lt;br /&gt;
#* About different ways to design tables&lt;br /&gt;
#* Set horizontal border divider for the table&lt;br /&gt;
#* Set background to a particular color on hovering the mouse&lt;br /&gt;
#* Set an image as a background for the table&lt;br /&gt;
#* Set zebra stripe design for the table&lt;br /&gt;
#* Decorate table column-wise&lt;br /&gt;
#* Set background color for the column of a table&lt;br /&gt;
#* Set layout property for the table&lt;br /&gt;
#* Create responsive table&lt;br /&gt;
#Forms in CSS&lt;br /&gt;
#* About properties used for styling forms&lt;br /&gt;
#* Design input text&lt;br /&gt;
#** Set border and border-radius property&lt;br /&gt;
#** Set width&lt;br /&gt;
#** Set padding&lt;br /&gt;
#** Set text color and background color&lt;br /&gt;
#** Use of focus selector&lt;br /&gt;
#** Set background image&lt;br /&gt;
#** Set text-indentation property&lt;br /&gt;
#** Set transition property&lt;br /&gt;
#* Design label&lt;br /&gt;
#* Design Select Menu&lt;br /&gt;
#* Design Textarea&lt;br /&gt;
#* Design input buttons&lt;br /&gt;
#* Create a responsive form using media rule&lt;br /&gt;
&lt;br /&gt;
=== Advance Level ===&lt;br /&gt;
&lt;br /&gt;
#Counters in CSS&lt;br /&gt;
#* About counters&lt;br /&gt;
#* About counters properties:&lt;br /&gt;
#** counter-reset property&lt;br /&gt;
#** counter-increment property&lt;br /&gt;
#** counter-reset property&lt;br /&gt;
#** counter() or counters() function&lt;br /&gt;
#* Set headings&lt;br /&gt;
#* Set counter for the headings&lt;br /&gt;
#* About nested counters&lt;br /&gt;
#* Set nested counter for the headings&lt;br /&gt;
#Multi-column Layout in CSS&lt;br /&gt;
#* About multi-column layout&lt;br /&gt;
#* About column properties&lt;br /&gt;
#* Add some text to the webpage	&lt;br /&gt;
#* Set column-width property for the text&lt;br /&gt;
#* Set column-count property for the text&lt;br /&gt;
#* Set column-gap property for the text&lt;br /&gt;
#* Set column-rule-style property for the text&lt;br /&gt;
#* Set column-rule-color property for the text&lt;br /&gt;
#* Set column-rule property for the text&lt;br /&gt;
#* Set column-span property for the text&lt;br /&gt;
#Web Layout in CSS&lt;br /&gt;
#* About web layout&lt;br /&gt;
#* About header&lt;br /&gt;
#* Set heading as a header	&lt;br /&gt;
#* Set CSS properties for header&lt;br /&gt;
#* About menu bar&lt;br /&gt;
#* Set links as a menu bar&lt;br /&gt;
#* Set CSS properties for the menu bar&lt;br /&gt;
#* About content&lt;br /&gt;
#* Set paragraphs as content&lt;br /&gt;
#* Set CSS properties for content&lt;br /&gt;
#* About footer&lt;br /&gt;
#* Set some text as the footer&lt;br /&gt;
#* Set CSS properties for footer&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/CSS</id>
		<title>CSS</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/CSS"/>
				<updated>2021-07-19T08:28:40Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: /* Basic Level */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheet (CSS) is a style sheet language used to style documents written in a markup language like HTML and XML. It allows developers to control how the webpage should be displayed by applying styles ( e.g color, font, space). Before CSS, all the styles and formatting were explicitly defined within HTML. Due to this, the creation of large websites became a long and expensive process. This is because, for every single page, style information has to be added repeatedly. For the solution of this problem, the World Wide Consortium (W3C) introduced CSS in 1996. CSS file is an independent file and is saved with [dot] CSS (.css) extension. Now developers can write the style information of the web pages to a separate style sheet. The separation of HTML and CSS i.e content and styling, makes it easier to maintain sites, improves content accessibility, share style sheets across pages and provides more flexibility. CSS3 is the latest version of the Cascading Style Sheets language and extends CSS2.1. It has several new features like shadows, gradients, rounded corners transitions or animations, and new layouts like a multi-columns, flexible box or grid layouts. The CSS specifications are maintained by the World Wide Consortium (W3C). The latest snapshot of CSS published by it is available at https://www.w3.org/TR/css-2018&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=== Basic Level ===&lt;br /&gt;
&lt;br /&gt;
#Overview of CSS&lt;br /&gt;
#* CSS Overview&lt;br /&gt;
#* About CSS&lt;br /&gt;
#* The content available in various tutorials in this series&lt;br /&gt;
# First CSS File&lt;br /&gt;
#* Create a CSS file&lt;br /&gt;
#* Syntax of CSS to write a style&lt;br /&gt;
#* Types of Selectors&lt;br /&gt;
#* About Declaration &lt;br /&gt;
#* Save the CSS file in a folder&lt;br /&gt;
#* Link a CSS file with an HTML file&lt;br /&gt;
#* Descendant Selector with example&lt;br /&gt;
#* Grouping Selector with example&lt;br /&gt;
#* Universal Selector with example&lt;br /&gt;
#* Id Selector with example&lt;br /&gt;
#* Class Selector with example&lt;br /&gt;
#Dimensions and Measuring Units in CSS&lt;br /&gt;
#* What are measuring Units&lt;br /&gt;
#* What are relative Units&lt;br /&gt;
#* What are absolute Units&lt;br /&gt;
#* Setting width using percentage &lt;br /&gt;
#* Setting font size using percentage&lt;br /&gt;
#* Setting font size using points&lt;br /&gt;
#* Setting height using centimetre&lt;br /&gt;
#* Setting properties for paragraph&lt;br /&gt;
#* Setting properties for heading&lt;br /&gt;
#* What are heading tag sizes&lt;br /&gt;
#Box Model in CSS&lt;br /&gt;
#* What is Box Model&lt;br /&gt;
#* Setting border using properties: Style, Width, Color&lt;br /&gt;
#* Setting different border styles for each side&lt;br /&gt;
#* Setting margin&lt;br /&gt;
#* Setting different margins for each side&lt;br /&gt;
#* Setting Padding&lt;br /&gt;
#* Setting properties for division tag&lt;br /&gt;
#Background in CSS&lt;br /&gt;
#* What are background properties&lt;br /&gt;
#* How to style background&lt;br /&gt;
#* Setting background-color using:&lt;br /&gt;
#** Color names&lt;br /&gt;
#** Hexadecimal values&lt;br /&gt;
#** RGB values&lt;br /&gt;
#* Setting background image&lt;br /&gt;
#* Setting background-repeat property&lt;br /&gt;
#* Setting background-attachment property&lt;br /&gt;
#* Setting background-position property&lt;br /&gt;
#* Styling background using shorthand&lt;br /&gt;
#Text Properties in CSS&lt;br /&gt;
#* Format and style text elements&lt;br /&gt;
#* Use of color names, hexadecimal values and RGB values to set the text color &lt;br /&gt;
#* Align the text horizontally using left, right, center and justify options&lt;br /&gt;
#* Indent the text using the length values - cm, px, and  %&lt;br /&gt;
#* Change the letter spacing and word spacing of the text&lt;br /&gt;
#* Set the line height of the text &lt;br /&gt;
#* Set the direction property using ltr and rtl values&lt;br /&gt;
#* Transform the text using values &lt;br /&gt;
#* Decorate the text &lt;br /&gt;
#* Apply shadow effect on the text&lt;br /&gt;
#Font Properties in CSS&lt;br /&gt;
#* Set the font-family property of the text&lt;br /&gt;
#* Style text font using the font-style property&lt;br /&gt;
#* Use of font-style values - normal, italic &amp;amp; oblique&lt;br /&gt;
#* Specify the thickness of the font&lt;br /&gt;
#* Use of font-weight values  - keywords &amp;amp; numeric&lt;br /&gt;
#* Vary the font text using the font-variant values - small caps and normal&lt;br /&gt;
#* Set the font size using points&lt;br /&gt;
#* Use of font-size values - length , keywords &amp;amp; percentage&lt;br /&gt;
#* Set the font properties using the shorthand method&lt;br /&gt;
#Display Property in CSS&lt;br /&gt;
#* Set the display property to present an element on the webpage&lt;br /&gt;
#* Use of display property values&lt;br /&gt;
#** Set the display property using -  Block, Inline,  None values&lt;br /&gt;
#* Create elements using an id selector.&lt;br /&gt;
#* Set height, width and background for the elements&lt;br /&gt;
#** Style the paragraphs&lt;br /&gt;
#* Remove the display property&lt;br /&gt;
#** Undo the changes in the files&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/CSS</id>
		<title>CSS</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/CSS"/>
				<updated>2021-07-19T08:20:11Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Introduction ===&lt;br /&gt;
&lt;br /&gt;
Cascading Style Sheet (CSS) is a style sheet language used to style documents written in a markup language like HTML and XML. It allows developers to control how the webpage should be displayed by applying styles ( e.g color, font, space). Before CSS, all the styles and formatting were explicitly defined within HTML. Due to this, the creation of large websites became a long and expensive process. This is because, for every single page, style information has to be added repeatedly. For the solution of this problem, the World Wide Consortium (W3C) introduced CSS in 1996. CSS file is an independent file and is saved with [dot] CSS (.css) extension. Now developers can write the style information of the web pages to a separate style sheet. The separation of HTML and CSS i.e content and styling, makes it easier to maintain sites, improves content accessibility, share style sheets across pages and provides more flexibility. CSS3 is the latest version of the Cascading Style Sheets language and extends CSS2.1. It has several new features like shadows, gradients, rounded corners transitions or animations, and new layouts like a multi-columns, flexible box or grid layouts. The CSS specifications are maintained by the World Wide Consortium (W3C). The latest snapshot of CSS published by it is available at https://www.w3.org/TR/css-2018&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
=== Basic Level ===&lt;br /&gt;
&lt;br /&gt;
# Introduction to CSS 2.0 &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* What is CSS&lt;br /&gt;
#* How does CSS work&lt;br /&gt;
#* What can we do with CSS&lt;br /&gt;
# CSS syntax and inline style &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Description of CSS syntax&lt;br /&gt;
#* Inline Style&lt;br /&gt;
#* Styling Headings&lt;br /&gt;
# Our First Style Sheet &amp;amp;nbsp; &amp;amp;nbsp; &lt;br /&gt;
#* Why and how we should use external stylesheets&lt;br /&gt;
#* The importance of the DOCTYPE declaration&lt;br /&gt;
#* How to add comments to CSS&lt;br /&gt;
#* Adding background color and images and aligning text&lt;br /&gt;
# Working with Text properties  &lt;br /&gt;
#* Units used in CSS&lt;br /&gt;
#* Letter-spacing	&lt;br /&gt;
#* Line-height&lt;br /&gt;
#* Text-decoration&lt;br /&gt;
#* Text-indent&lt;br /&gt;
# Text transformation, alignment and fonts  &lt;br /&gt;
#* Text-transform&lt;br /&gt;
#* Vertical-align&lt;br /&gt;
#* White-space&lt;br /&gt;
#* Word-spacing&lt;br /&gt;
#* The span element&lt;br /&gt;
#* Font-style&lt;br /&gt;
#* Font-variant&lt;br /&gt;
#* Font-weight&lt;br /&gt;
#* Font-size&lt;br /&gt;
#* Font-family&lt;br /&gt;
# Box model properties  &lt;br /&gt;
#* What is the box model?&lt;br /&gt;
#* What are the properties of boxes in CSS?	&lt;br /&gt;
#* How do we change box properties?&lt;br /&gt;
# Box model dimensions  &lt;br /&gt;
#* How to outline elements&lt;br /&gt;
#* How to adjust margins	&lt;br /&gt;
#* How to set the dimension size of elements&lt;br /&gt;
#* How to use div tags to contain elements within the body&lt;br /&gt;
# Applying styles to tables and lists &lt;br /&gt;
#* How to use border-collapse and border-spacing to control the appearance of table borders&lt;br /&gt;
#* How to set the empty-cells parameter to hide or display borders around empty cells	&lt;br /&gt;
#* How to control cell width using table-layout&lt;br /&gt;
#* How to set the caption location using caption-side&lt;br /&gt;
# List styles  &lt;br /&gt;
#* How to use CSS to control list markers&lt;br /&gt;
#* How to use CSS to set styles in multi-level lists&lt;br /&gt;
# Positioning and visibility  &lt;br /&gt;
#* How to set the position property of an element&lt;br /&gt;
#* How to change the top, bottom, left, and right position values&lt;br /&gt;
#* How to set the clip value of an image&lt;br /&gt;
#* How to use the overflow property&lt;br /&gt;
# Positioning and layout &lt;br /&gt;
#* How to use the z-index to set layers on a page&lt;br /&gt;
#* How to float and clear to control page layout&lt;br /&gt;
#* How to use the display and visibility properties of an element to alter the way images and other elements appear&lt;br /&gt;
# Applying styles selectively &lt;br /&gt;
#* How to use inheritance&lt;br /&gt;
#* How to use ID as a selector&lt;br /&gt;
#* How to use nesting&lt;br /&gt;
#* How to use grouping&lt;br /&gt;
# Using classes and containers &lt;br /&gt;
#* How to use classes to refine how styles are applied&lt;br /&gt;
#* How to use span and div to apply styles to elements within classes&lt;br /&gt;
#* How to use classes, span, and div to create a highlighted menu&lt;br /&gt;
# Pseudo classes and pseudo elements &lt;br /&gt;
#* What pseudo classes and pseudo elements are&lt;br /&gt;
#* How to use anchor pseudo classes&lt;br /&gt;
#* How to combine pseudo classes with CSS classes&lt;br /&gt;
#* How to use first-line and first-letter pseudo elements&lt;br /&gt;
# Working with paged media &lt;br /&gt;
#* How to use CSS to format a web page for printing by setting page breaks&lt;br /&gt;
#* How to use page breaks to prevent widows and orphans&lt;br /&gt;
# Time saver tools &lt;br /&gt;
#* How to use web-based tools to help us generate CSS style sheets&lt;br /&gt;
#* How to use web-based tools to help us generate CSS style sheets&lt;br /&gt;
# Image gallery and image opacity&lt;br /&gt;
#* How to use CSS to create an image gallery&lt;br /&gt;
#* How to use CSS to create an image gallery&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C4/Promise-and-Async-Await-in-JS/English</id>
		<title>JavaScript/C4/Promise-and-Async-Await-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C4/Promise-and-Async-Await-in-JS/English"/>
				<updated>2021-06-08T16:27:08Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Promise and Async-Await&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, Promise, resolve, reject, pending, async, await&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and welcome to the spoken tutorial on “'''Promise''' and '''Async-Await '''in''' JS'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* '''Promise'''&lt;br /&gt;
* '''Chaining in Promises''' and&lt;br /&gt;
* '''Async-Await '''in''' JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Promise&lt;br /&gt;
|| The '''Promise object '''&lt;br /&gt;
* represents the eventual completion (or failure) of an '''asynchronous operation '''and its resulting value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Promise&lt;br /&gt;
|| A '''Promise '''is always in one of these states:&lt;br /&gt;
* '''pending''': is the initial state, neither fulfilled nor rejected.&lt;br /&gt;
* '''fulfilled''': indicates that the operation was completed successfully. &lt;br /&gt;
** So, .'''then()''' gets '''executed'''&lt;br /&gt;
* '''rejected''': indicates that the operation failed. &lt;br /&gt;
** so, '''.catch()''' gets '''executed'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS '''-&amp;gt;''' index.html &amp;amp; main.js'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Then open the files '''index.html''' and '''main.js''' as explained in the earlier tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this demonstration, I have already opened the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These files are available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt; Promise and Async-Await &amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src = &amp;quot;main.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, replace the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press: Alt + L and Alt + O &lt;br /&gt;
|| Save the file and start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''Console''' tab&lt;br /&gt;
|| In the '''web browser''', open the '''Browser developer tools''' panel and go to the '''Console tab'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const p = new Promise(function (resolve, reject) {&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve();&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(p);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
console.log(p);&lt;br /&gt;
&lt;br /&gt;
}, 3000);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const p = new Promise&lt;br /&gt;
|| Here, I have '''declared''' a '''Promise '''with '''new Context '''and assigned it to the '''promise variable'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Promise '''is a '''class''' in '''JS.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(function (resolve, reject) {&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve();&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
|| A '''Promise '''accepts a '''callback function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''callback function '''accepts two '''parameters.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
resolve, &lt;br /&gt;
|| The '''parameters '''can be named as per your choice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have defined the first '''parameter''' as '''resolve ''' indicating the '''success state '''of '''promise.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
reject&lt;br /&gt;
|| And, the second '''parameter''' is defined as '''reject ''' indicating the '''failure state '''of '''promise.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
resolve, reject&lt;br /&gt;
|| Both the '''parameters''' are '''callback functions'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can give any '''variable''' names of your choice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, I’m using the standard '''variable names''' - '''resolve '''and '''reject'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve();&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
|| As mentioned, a '''promise '''always '''returns''' a''' state.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We usually make an '''API call''' using '''Promise. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But for now, I’m mocking the '''API call''' using '''setTimeout.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: &amp;lt;/nowiki&amp;gt;resolve();&lt;br /&gt;
|| As discussed, '''resolve''' and '''reject''' are '''callback functions'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here I’m making a '''function call resolve() '''which will '''return''' a '''fulfilled state.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: &amp;lt;/nowiki&amp;gt;2000&lt;br /&gt;
|| You already know that the '''setTimeout function''' accepts a second '''parameter''' in '''milliseconds'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, I’m '''passing 2000'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, the '''callback function''' will be '''executed''' after '''2 seconds'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Promise&lt;br /&gt;
|| As discussed earlier the different '''states''' of a '''promise''' are mentioned here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To verify them, I will be using '''console.log statements.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(p);&lt;br /&gt;
|| I have initially printed the '''p value '''. &lt;br /&gt;
As you know by default the '''promise '''will be in '''pending state.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''p value''' gets '''printed '''in the initial '''program execution'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
console.log(p);&lt;br /&gt;
&lt;br /&gt;
}, 3000);&lt;br /&gt;
|| Here, I’m printing to see the '''state''' of the '''promise '''after '''3 seconds'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because the '''setTimeout function''' executes the '''resolve function '''and '''returns success '''after '''2 seconds.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So to verify the '''fulfilled state''', I’m printing the '''promise '''after '''3 seconds.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show 3 seconds delay.&lt;br /&gt;
&lt;br /&gt;
(While recording)&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;Promise { &amp;lt;state&amp;gt;: &amp;quot;fulfilled&amp;quot;, &amp;lt;value&amp;gt;: undefined }&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
|| If you have noticed here, the '''fulfilled state '''is printed after 3 seconds. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because after '''2 seconds''' the '''setTimeout function returned success.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As I have not '''returned''' anything, the value is seen as '''Undefined'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| So far we have learnt about the basic concept of how '''promise''' works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let's take another example and understand the usage.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function onSuccess() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function onError() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Error!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const promise = new Promise(function (resolve, reject) {&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve();&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
promise.then(onSuccess);&lt;br /&gt;
&lt;br /&gt;
promise.catch(onError); &lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function onSuccess() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function onError() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Error!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have defined two '''functions onSuccess '''and '''onError.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first will print ‘'''Success!’''' on execution of '''onSuccess function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second will print '''‘Error!’ '''on execution of '''onError function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I’ll be using these '''functions '''in the '''promise''' example.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const promise = new Promise(function (resolve, reject) {&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve();&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
|| Here, I have '''declared''' a similar '''promise''', which '''resolves '''after 2 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you are already aware, the '''promise variable''' will hold the '''returned state.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
promise.then(onSuccess);&lt;br /&gt;
|| So, here when the '''state '''is '''fulfilled''', the '''.then method''' gets '''executed.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''.then method''' accepts a '''callback function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, I’m '''passing''' the '''onSuccess function '''as a '''parameter.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''onSuccess function '''gets '''executed''' when the state is '''fulfilled'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
promise.catch(onError); &lt;br /&gt;
|| If the '''state '''is '''rejected''', then the '''.catch method''' gets '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''.catch method''' accepts a '''callback function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, I’m passing '''onError function '''here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''onError function '''will get executed if the '''promise '''is '''rejected'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Success!'''&lt;br /&gt;
|| As the '''promise '''is resolved after 2 seconds, the '''state '''will be '''fulfilled.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As the '''state '''is '''fulfilled''', the '''.then method''' gets '''executed.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''.then method''' has '''onSuccess function '''as a '''callback.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hence the '''onSuccess function '''is '''executed''' and '''Success log''' is displayed here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now let us take another example considering a scenario where we need to execute multiple '''functions.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To achieve this, we need to learn about '''chaining'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function getPromise() {&lt;br /&gt;
&lt;br /&gt;
return new Promise((resolve) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
setTimeout(resolve, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function logA() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;A&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function logB() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;B&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function logCAndThrow() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;C&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
throw new Error();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function catchError() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Error!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
getPromise().then(logA).then(logB).then(logCAndThrow).catch(catchError);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function getPromise() {&lt;br /&gt;
&lt;br /&gt;
return new Promise((resolve) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
setTimeout(resolve, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have '''declared''' a '''function '''which '''returns''' a '''Promise '''on its '''execution.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return new Promise((resolve) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
setTimeout(resolve, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
|| The '''returned promise '''will resolve after '''2 seconds'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function logA() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;A&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function logB() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;B&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function logCAndThrow() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;C&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
throw new Error();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function catchError() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Error!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have '''declared''' 4 different '''functions''' which just '''print '''on '''execution'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
throw new Error();&lt;br /&gt;
|| In the '''logCAndThrow function''', I have '''thrown '''an error '''explicitly'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As the '''function rejects '''in the middle of '''execution''', so the '''catch method''' gets '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s see this.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: &amp;lt;/nowiki&amp;gt;'''getPromise()'''&lt;br /&gt;
|| Here, I make a '''getPromise function call''' and start '''chaining''' the rest of the '''methods'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: &amp;lt;/nowiki&amp;gt;'''.then(logA)'''&lt;br /&gt;
|| Now I '''chain''' to '''execute''' the '''logA function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: &amp;lt;/nowiki&amp;gt;'''.then(logB)'''&lt;br /&gt;
|| Next I '''chain''' to '''execute''' the '''logB function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''.then(logCAndThrow)'''&lt;br /&gt;
|| After this I '''chain''' to '''execute''' the '''logCAndThrow function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''.catch(catchError);'''&lt;br /&gt;
|| Then I '''execute''' the '''catchError function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let’s see how it works.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''A'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Here, as the '''promise resolves '''to a '''fulfilled state''', '''.then method''' gets '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have '''passed''' the '''logA function '''in the first''' .then() method'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''log A function''' gets '''executed''' and prints''' A.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''B'''&lt;br /&gt;
|| Since the''' logA function''' is '''executed''' without errors, the next''' .then method''' in the chain gets executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have '''passed''' the '''logB function '''in the second '''.then() method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''logB function '''is '''executed''' and '''B''' is printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''C'''&lt;br /&gt;
|| Since the '''logB function '''is executed without errors, the next '''.then method '''in the '''chain''' gets '''executed'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have '''passed''' the '''logCAndThrow function '''in the third '''.then() method'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''logCAndThrow function''' gets '''executed''' and''' C''' is printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
throw new Error();&lt;br /&gt;
|| As discussed earlier, we are explicitly throwing an '''error '''from the '''logCAndThrow function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will get an '''error''', when the '''function '''is '''executed'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Error!'''&lt;br /&gt;
|| We got an error while '''executing''' the '''logCAndThrow function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, the .'''catch method '''gets '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have '''passed '''the''' catchError function''' in the '''.catch method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, the '''catchError function '''is executed and '''Error! '''is printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| The advantages of '''chaining''' are&lt;br /&gt;
&lt;br /&gt;
* the code would be more modular and readable and &lt;br /&gt;
* can have one proper '''error handling mechanism'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
getPromise()'''.then(logA).then(logB).then(logCAndThrow).'''catch(catchError);&lt;br /&gt;
|| Here, we have '''chained multiple function calls'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While '''executing''' this, we could encounter some error at '''run-time'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If so, the further '''.then''' '''execution''' will be stopped and '''.catch method''' will get '''executed'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Next let’s learn about '''async-await.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Async - Await&lt;br /&gt;
|| &lt;br /&gt;
* '''async keyword '''- instructs the '''interpreter '''that there’s an '''asynchronous call''' happening inside the '''function'''.&lt;br /&gt;
* '''async function '''always '''returns''' a '''Promise'''&lt;br /&gt;
* '''await keyword '''&lt;br /&gt;
** tells the '''interpreter '''to wait for the '''function '''to '''return.'''&lt;br /&gt;
** Only after that the next instruction will be '''executed'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
async function display() {&lt;br /&gt;
&lt;br /&gt;
return 1;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(display());&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display()&lt;br /&gt;
&lt;br /&gt;
.then(() =&amp;gt; console.log(&amp;quot;Promise is resolved!&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
.catch(() =&amp;gt; console.log(&amp;quot;Promise is rejected!&amp;quot;));&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
async function display() {&lt;br /&gt;
&lt;br /&gt;
return 1;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| First, let's understand the basics of '''async function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, I have '''declared''' a '''function''' '''display'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
async function&lt;br /&gt;
|| I’m using the '''async keyword '''besides the '''function keyword.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tells the '''interpreter''' to consider this as an '''asynchronous function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return 1;&lt;br /&gt;
|| Here, the '''function returns 1 ''' which is the value being '''returned'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The value is '''returned''' along with the '''state'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(display());&lt;br /&gt;
|| To verify the '''state '''and value, I have '''logged''' the '''function '''inside the '''console statement'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display()&lt;br /&gt;
&lt;br /&gt;
.then(() =&amp;gt; console.log(&amp;quot;Promise is resolved!&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
.catch(() =&amp;gt; console.log(&amp;quot;Promise is rejected!&amp;quot;));&lt;br /&gt;
|| Here, to verify the '''promise state, '''I have used '''.then''' and '''.catch methods.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.then(() =&amp;gt; console.log(&amp;quot;Promise is resolved!&amp;quot;))&lt;br /&gt;
|| Here, in '''.then''' I have '''logged''' a message in the '''callback function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
catch(() =&amp;gt; console.log(&amp;quot;Promise is rejected!&amp;quot;));&lt;br /&gt;
|| Similarly in '''.catch''' I have '''logged''' a message in the '''callback function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;Promise { &amp;lt;state&amp;gt;: &amp;quot;fulfilled&amp;quot;, &amp;lt;value&amp;gt;: 1 }&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
|| If you see here, the '''state '''is '''fulfilled '''and the''' value''' is '''1.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''value 1''' is displayed here as the '''value returned''' from the '''function '''is '''1.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Promise is resolved!'''&lt;br /&gt;
|| As the''' promise '''is in the '''fulfilled '''state, '''.then method''' gets '''executed.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It prints the message inside the''' .then callback function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have only learnt about the '''async keyword''' so far. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let’s learn about the '''await keyword'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const getData = () =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
new Promise(function (resolve, reject) {&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve(&amp;quot;My Data&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
async function display() {&lt;br /&gt;
&lt;br /&gt;
const userData = await getData();&lt;br /&gt;
&lt;br /&gt;
console.log(userData);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display();&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const getData = () =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
new Promise(function (resolve, reject) {&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve(&amp;quot;My Data&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
|| Here, I have '''declared''' a '''promise''', which '''resolves''' after 2 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''resolved promise '''will '''return My Data string''' as the value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
async function display() {&lt;br /&gt;
&lt;br /&gt;
const userData = await getData();&lt;br /&gt;
&lt;br /&gt;
console.log(userData);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have '''declared''' an '''async display function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have mentioned the '''async keyword '''beside '''function declaration.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, it instructs the '''interpreter''' telling that inside this '''function '''some '''asynchronous calls''' are made.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const userData = await getData();&lt;br /&gt;
|| Here, '''await keyword '''is used before the '''getData function call.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is to tell the '''interpreter''' to wait until the '''getData function returns''' something.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next instruction will be '''interpreted''' only after the '''getData function''' completes '''execution'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(userData);&lt;br /&gt;
|| The '''returned data''' is stored in the '''userData variable '''to verify I’m '''logging''' the '''variable'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
display();&lt;br /&gt;
|| Here, I make a '''display function call''' to execute the '''display function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show 2 seconds delay in '''console.'''&lt;br /&gt;
&lt;br /&gt;
(While recording)&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
'''My Data'''&lt;br /&gt;
|| If you have noticed the '''delay''', initially the '''console '''was empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then after 2 seconds, we see '''My Data '''displayed in the '''console'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''interpreter''' waited for the '''getData function '''to '''return''' something.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only then it '''executes''' further instruction.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* '''Promise'''&lt;br /&gt;
* '''Chaining in Promises''' and&lt;br /&gt;
* '''Async-Await '''in '''JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
* Open the file '''assignment.js''' which you have created earlier.&lt;br /&gt;
* Clear the existing code.&lt;br /&gt;
* Create a '''promise p'''&lt;br /&gt;
* And resolve the '''promise '''after 2 seconds&lt;br /&gt;
* '''Log ‘Promise is resolved'''!’ after the '''promise resolves'''.&lt;br /&gt;
* Else, '''log Error! '''&lt;br /&gt;
* Open the file '''MyPage.html''' in a '''web browser'''.&lt;br /&gt;
* Observe the output in the '''browser’s console'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide:  Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh and this is Praveen signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C4/Project-Github-Repos/English</id>
		<title>JavaScript/C4/Project-Github-Repos/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C4/Project-Github-Repos/English"/>
				<updated>2021-06-08T15:33:02Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Project: Github Repos&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, github, fetch, repos, event&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and welcome to the spoken tutorial on “'''Project: Github Repos'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will be working on '''Project - GithubRepos '''in''' JS.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
* '''Firefox''' web browser&lt;br /&gt;
&lt;br /&gt;
However, you may use any other browser of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| As a pre-requisite, &lt;br /&gt;
&lt;br /&gt;
* You need '''internet connectivity''' to practice this tutorial.&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Github Repos&lt;br /&gt;
|| &lt;br /&gt;
* In this '''project''', we need to have a '''textbox '''and '''button '''in the '''UI.'''&lt;br /&gt;
* We need to allow the '''user''' to enter a '''github username''' using the '''textbox'''.&lt;br /&gt;
* On click of a '''button''', we need to make an '''API '''call and display the '''response''' in the '''console'''.&lt;br /&gt;
* NOTE: Proper '''error handling''' must be done using the '''response'''.&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us start working on the '''project'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||[Editor] Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS '''-&amp;gt;''' index.html &amp;amp; main.js'''&lt;br /&gt;
&lt;br /&gt;
|| Then open the files '''index.html''' and '''main.js''' as explained in the earlier tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this demonstration, I have already opened the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These files are available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt; Project – Github Repo &amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;label for = &amp;quot;username&amp;quot; &amp;gt; Username &amp;lt;/label&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;input type = &amp;quot;text&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
name = &amp;quot;username&amp;quot;&lt;br /&gt;
&lt;br /&gt;
id = &amp;quot;username&amp;quot;&lt;br /&gt;
&lt;br /&gt;
placeholder = &amp;quot;Enter Username&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;button id = &amp;quot;getDataButton&amp;quot; &amp;gt; GET REPO DATA &amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;p id = &amp;quot;displayData&amp;quot; &amp;gt; &amp;lt;/p&amp;gt; &amp;lt;script src = &amp;quot;main.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, replace the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||[Editor] Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;label for=&amp;quot;username&amp;quot;&amp;gt;Username&amp;lt;/label&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, I have created a '''label '''for the '''username''' '''textbox'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;input&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
type = &amp;quot;text&amp;quot;&lt;br /&gt;
&lt;br /&gt;
name = &amp;quot;username&amp;quot;&lt;br /&gt;
&lt;br /&gt;
id = &amp;quot;username&amp;quot;&lt;br /&gt;
&lt;br /&gt;
placeholder = &amp;quot;Enter Username&amp;quot; /&amp;gt;&lt;br /&gt;
|| Here, I have created &lt;br /&gt;
&lt;br /&gt;
* a '''username''' '''textbox '''with the '''name '''and '''id '''as '''username'''&lt;br /&gt;
* and the '''placeholder '''as '''Enter username.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;button id = &amp;quot;getDataButton&amp;quot; &amp;gt; GET REPO DATA &amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, I have created a '''button '''with the '''id getDataButton.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;p id=&amp;quot;displayData&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| To display the '''data''', I’m using a '''paragraph tag '''with the '''id '''as '''displayData'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press: Alt + L and Alt + O &lt;br /&gt;
|| Save the file and Start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''Console''' tab&lt;br /&gt;
|| In the web browser, open the '''Browser developer tools''' panel and go to the '''console tab'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;getDataButton&amp;quot;).addEventListener(&amp;quot;click&amp;quot;, getData);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function getData() {&lt;br /&gt;
&lt;br /&gt;
const userName = document.getElementById(&amp;quot;username&amp;quot;).value;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fetch(`http://api.github.com/users/${userName}/repos`)&lt;br /&gt;
&lt;br /&gt;
.then((response) =&amp;gt; response.json())&lt;br /&gt;
&lt;br /&gt;
.then((data) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
console.log(data);&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;displayData&amp;quot;).innerText = JSON.stringify(data);&lt;br /&gt;
&lt;br /&gt;
})&lt;br /&gt;
&lt;br /&gt;
.catch((error) =&amp;gt; console.log(error));&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', type the '''code''' as shown in '''main.js'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;getDataButton&amp;quot;).addEventListener(&amp;quot;click&amp;quot;, getData);&lt;br /&gt;
|| Here, I have added a '''click''' '''event''' '''listener''' for the '''button '''with the '''id getDataButton.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On click, I’m calling the '''getData function '''which is '''declared''' below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Functions '''are '''hoisted''', so there is no problem here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function getData() {&lt;br /&gt;
|| Here, I have '''declared''' a '''function '''with the name '''getData.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const userName = document.getElementById(&amp;quot;username&amp;quot;).value;&lt;br /&gt;
|| Inside the '''function '''I’m taking the value of the '''textbox '''to pass it to the '''URL.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fetch(`http://api.github.com/users/${userName}/repos`)&lt;br /&gt;
|| Here, I’m using the '''Repo’s URL '''to '''pass''' the '''username'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''`'''http://api.github.com/users/${userName}/repos'''`'''&lt;br /&gt;
|| As you can see, I have used '''template literals''' to '''concatenate strings'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.then((response) =&amp;gt; response.json())&lt;br /&gt;
|| You are already aware that the '''response '''contains '''data '''along with '''headers'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To '''return '''only '''data, '''we need to use '''.json()'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.then((data) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
console.log(data);&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;displayData&amp;quot;).innerText = JSON.stringify(data);&lt;br /&gt;
&lt;br /&gt;
})&lt;br /&gt;
|| Here, I get the '''data''' using the '''callback function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(data);&lt;br /&gt;
|| I '''log''' that '''data''' here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;displayData&amp;quot;).innerText&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| To display the '''data''' in the '''paragraph, '''I first access the '''element '''using '''id.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then I assign the '''value '''to '''innerText '''property.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
JSON.stringify(data);&lt;br /&gt;
|| I '''stringify''' the '''data''' and assign it to the '''element'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''JSON.stringify''' is a '''JS inbuilt method''' to convert anything to '''string'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As '''DOM '''can only render '''string, '''I’m converting the '''object '''to '''string'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.catch((error) =&amp;gt; console.log(error));&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| If there are any '''errors,''' I will '''log''' the '''error''' in the '''console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Type '''jayeshkattar'''&lt;br /&gt;
|| I will type '''jayeshkattar '''in the input '''textbox'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Click on GET REPO DATA&lt;br /&gt;
|| Then click on the '''GET REPO DATA''' button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;Array(30) [ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, … ]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
|| We see 30 repositories of the '''user jayeshkattar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is real time '''data. '''You may get a different number when you practice this tutorial. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Window] [Highlight]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[{&amp;quot;id&amp;quot;:55542315,&amp;quot;node_id&amp;quot;:&amp;quot;MDEwOlJlcG9zaXRvcnk1NTU0MjMxNQ==&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
&amp;quot;name&amp;quot;:&amp;quot;adv_project&amp;quot;,&amp;quot;full_name&amp;quot;:&amp;quot;jayeshkattar/adv_project&amp;quot;,&amp;quot;private&amp;quot;:false,&amp;quot;owner&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
{&amp;quot;login&amp;quot;:&amp;quot;jayeshkattar&amp;quot;,&amp;quot;id&amp;quot;:10&amp;lt;/nowiki&amp;gt;550364,&amp;quot;node_id&amp;quot;:&amp;quot;MDQ6VXNlcjEwNTUwMzY0&amp;quot;,&amp;quot;avatar_url&amp;quot; … .. . . .&lt;br /&gt;
&lt;br /&gt;
|| I have displayed the '''data''' in the '''DOM, '''too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this, we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have worked on '''Project - Github Repos''' in '''JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
&lt;br /&gt;
* If you have a '''github account''', type your '''username''' and check whether you see your '''repository '''details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide:''' '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh and this is Praveen signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C4/Fetch-API-in-JS/English</id>
		<title>JavaScript/C4/Fetch-API-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C4/Fetch-API-in-JS/English"/>
				<updated>2021-06-08T15:25:07Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Fetch API&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, Fetch, Promise, request, response&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and welcome to the spoken tutorial on “'''Fetch API in JS'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn:&lt;br /&gt;
* About '''Fetch API'''&lt;br /&gt;
* And its usage in '''JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
* '''Firefox''' web browser&lt;br /&gt;
&lt;br /&gt;
However, you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| As a pre-requisite, &lt;br /&gt;
* You need '''internet connectivity''' to practice this tutorial.&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Fetch API&lt;br /&gt;
|| &lt;br /&gt;
* The '''Fetch API '''provides an interface for fetching resources (including across the network)&lt;br /&gt;
* The '''fetch()''' '''method''' is used to fetch a resource.&lt;br /&gt;
* '''fetch() returns''' a '''Promise'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS '''-&amp;gt;''' index.html &amp;amp; main.js'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Then open the files '''index.html''' and '''main.js''' as explained in the earlier tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this demonstration, I have already opened the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These files are available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt; Fetch &amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src = &amp;quot;main.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, replace the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press: Alt + L and Alt + O &lt;br /&gt;
|| Save the file and start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''Console''' tab&lt;br /&gt;
|| In the '''web browser''', open the '''Browser developer tools''' panel and go to the '''Console tab'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fetch(&amp;quot;http://api.github.com/users/jayeshkattar&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
.then((response) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
console.log(response);&lt;br /&gt;
&lt;br /&gt;
return response.json();&lt;br /&gt;
&lt;br /&gt;
})&lt;br /&gt;
&lt;br /&gt;
.then((data) =&amp;gt; console.log(data))&lt;br /&gt;
&lt;br /&gt;
.catch((error) =&amp;gt; console.log(error));&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Earlier in the series, we learnt how '''promises '''mock '''data''' using '''setTimeout'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, we shall make a real '''service''' across the '''network''' to get the '''data'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure your '''device''' is connected to the '''internet''' to get '''data''', else you encounter errors.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fetch(&amp;quot;http://api.github.com/users/jayeshkattar&amp;quot;)&lt;br /&gt;
|| '''Fetch '''is a '''JS inbuilt method''' and is a '''wrapper''' of '''promise'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It accepts a '''URL '''to '''GET '''the '''data'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On success, it '''returns''' the '''state headers '''with the '''data'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.then((response) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
console.log(response);&lt;br /&gt;
&lt;br /&gt;
return response.json();&lt;br /&gt;
&lt;br /&gt;
})&lt;br /&gt;
|| If the '''state '''is '''fulfilled''', '''.then''' '''method''' gets '''executed.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(response) =&amp;gt;&lt;br /&gt;
|| The '''callback function '''takes the '''state headers '''as a '''parameter.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(response);&lt;br /&gt;
|| To verify this, I’m '''logging''' the '''raw data''' with the''' state headers.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return response.json();&lt;br /&gt;
|| And here I am '''returning''' the '''data''' alone.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.json();&lt;br /&gt;
|| '''.json method returns '''the''' data''' in the '''state headers.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a '''JS inbuilt method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
then((data) =&amp;gt; console.log(data))&lt;br /&gt;
|| Once, the '''data''' is '''returned''' to '''log''' the '''data''', I have chained the''' .then''' '''method''' again.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(data) =&amp;gt; &lt;br /&gt;
|| The '''callback function '''accepts the '''data.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(data)&lt;br /&gt;
|| To verify this, I’m printing the '''data '''here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.catch((error) =&amp;gt; console.log(error));&lt;br /&gt;
|| If there are any errors, '''.catch''' '''method''' takes the error and '''logs''' the same.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Response { type: &amp;quot;cors&amp;quot;, url: &amp;quot;[https://api.github.com/users/jayeshkattar https://api.github.com/users/jayeshkattar]&amp;quot;, redirected: true, status: 200, ok: true, statusText: &amp;quot;OK&amp;quot;, headers: Headers, body: ReadableStream, bodyUsed: false }'''&lt;br /&gt;
|| We have successfully verified that the '''fetch method returned''' the '''data''' with '''headers'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Object { login: &amp;quot;jayeshkattar&amp;quot;, id: 10550364, node_id: &amp;quot;MDQ6VXNlcjEwNTUwMzY0&amp;quot;, avatar_url: &amp;quot;[https://avatars0.githubusercontent.com/u/10550364?v=4 https://avatars0.githubusercontent.com/u/10550364?v=4]&amp;quot;, gravatar_id: &amp;quot;&amp;quot;, url: &amp;quot;[https://api.github.com/users/jayeshkattar https://api.github.com/users/jayeshkattar]&amp;quot;, html_url: &amp;quot;[https://github.com/jayeshkattar https://github.com/jayeshkattar]&amp;quot;, followers_url: &amp;quot;[https://api.github.com/users/jayeshkattar/followers https://api.github.com/users/jayeshkattar/followers]&amp;quot;, following_url: &amp;quot;[https://api.github.com/users/jayeshkattar/following https://api.github.com/users/jayeshkattar/following]{/other_user}&amp;quot;, gists_url: &amp;quot;[https://api.github.com/users/jayeshkattar/gists https://api.github.com/users/jayeshkattar/gists]{/gist_id}&amp;quot;, … }'''&lt;br /&gt;
|| Here we get the '''raw data''' of the '''github user'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Wondering where is this '''data''' coming from?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are coming from a '''github profile'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All the details displayed in the '''console''' are my details.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Open New Tab&lt;br /&gt;
|| Open a new tab in the '''browser'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [New Tab]: &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;[Type]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://github.com/jayeshkattar https://github.com/jayeshkattar] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Press Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''address bar''', type the '''URL''' as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, you can see all my profile details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The details mentioned here are the same which are displayed in the '''console''' too.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fetch(&amp;quot;http://api.github.com/users/jayeshkattar&amp;quot;)&lt;br /&gt;
|| I have used my '''username''' in the '''URL '''here,&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
http://api.github.com/users/jayeshkattar&lt;br /&gt;
|| If you have a '''github account''' you can replace '''jayeshkattar '''with your '''username''' and try.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You will get your '''user profile''' details.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* About '''Fetch API'''&lt;br /&gt;
* And its usage in '''JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
* Open the file '''assignment.js''' which you have created earlier.&lt;br /&gt;
* Clear the existing code.&lt;br /&gt;
* Get the weather '''data '''of '''Bengaluru '''using the below '''URL'''&lt;br /&gt;
* [http://api.openweathermap.org/data/2.5/weather?q=Bengaluru&amp;amp;appid=4e8fe55b900263c5f83603ed631e15ad http://api.openweathermap.org/data/2.5/weather?q=Bengaluru&amp;amp;appid=4e8fe55b900263c5f83603ed631e15ad]&lt;br /&gt;
* Log weather '''data '''in the '''console'''&lt;br /&gt;
* Open the file '''MyPage.html''' in a '''web browser'''.&lt;br /&gt;
* Observe the output in the '''browser’s  console'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide:''' '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh and this is Praveen signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C4/Classes-and-Inheritance-in-JS/English</id>
		<title>JavaScript/C4/Classes-and-Inheritance-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C4/Classes-and-Inheritance-in-JS/English"/>
				<updated>2021-06-08T15:16:50Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script:Classes and Inheritance&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, class, extends, methods, constructor&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and welcome to the spoken tutorial on “'''Classes''' and '''Inheritance''' in''' JS'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* '''Classes '''and&lt;br /&gt;
* '''Inheritance in JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Class&lt;br /&gt;
|| What are '''classes?'''&lt;br /&gt;
&lt;br /&gt;
* '''Classes''' are '''templates''' for creating '''objects'''&lt;br /&gt;
* '''Class declarations''' are not '''hoisted'''&lt;br /&gt;
* '''Classes''' have ‘'''this’ context'''&lt;br /&gt;
* '''constructor''', '''variables '''and '''methods '''can be '''declared''' inside the '''class'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us take an example and understand '''classes''' better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS '''-&amp;gt;''' index.html &amp;amp; main.js'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Then open the files '''index.html''' and '''main.js''' as explained in the earlier tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this demonstration, I have already opened the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These files are available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt; Class and Inheritance &amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src = &amp;quot;main.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, replace the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press: Alt + L and Alt + O &lt;br /&gt;
|| Save the file and Start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''Console''' tab&lt;br /&gt;
|| In the '''web browser''', open the '''Browser developer tools''' panel and go to the '''Console tab'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Animal {&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
this.name = name;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
walk() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Walk!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
eat() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Eat!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sleep() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Sleep!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const a1 = new Animal(&amp;quot;Lion&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
console.log(a1);&lt;br /&gt;
&lt;br /&gt;
a1.eat();&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Animal &lt;br /&gt;
|| To '''declare''' a '''class''', we use the''' keyword class '''followed by the '''class '''name.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
constructor(name)&lt;br /&gt;
|| '''Constructor method''' is '''declared''' using the '''constructor keyword'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It’s similar to the '''constructor function''', which we covered earlier when we learnt about '''functions'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
NOTE: '''constructor '''is an '''inbuilt function '''in '''JS''', which accepts any number of '''parameters'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, every '''class '''will have some '''private variables'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
this.name = name;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Those values are '''bound '''in the '''constructor'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
walk() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can walk!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
eat() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can eat!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sleep() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can sleep!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have '''declared''' 3 different '''methods''': '''walk, eat '''and '''sleep.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''method '''is similar to a '''function '''and is a part of the '''class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We don’t need any '''keyword '''to create a '''method'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only the '''method '''name is enough.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Eat!&amp;quot;);&lt;br /&gt;
|| Inside every '''method''', I have just '''logged''' a '''statement.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As '''methods''' are part of the '''class, this''' refers to '''class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''this.name''' refers to the '''name bound '''in the '''constructor'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To append '''strings''', we use the '''plus''' operator. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const a1 = new Animal(&amp;quot;Lion&amp;quot;);&lt;br /&gt;
|| Here, we’re doing something similar to the way of '''executing''' a '''constructor''' '''function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We '''execute''' the '''Animal class '''in the same way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On '''executing Animal '''here, the '''constructor '''in '''Animal class '''will be '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''parameter''' '''Lion '''which is '''passed''' here, is the '''name''' in the '''constructor'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are already aware that the '''constructor function returns''' an '''object'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''a1 variable '''will have an '''object'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(a1);&lt;br /&gt;
|| To verify that I’m '''logging a1'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
a1.eat();&lt;br /&gt;
|| Internally '''a1 object '''will have the '''prototypes''': '''walk, eat '''and '''sleep.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, here, I’m '''executing, a1.eat(); '''to verify the access to '''prototypes'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Click on ▶ icon beside Object and again click on &amp;lt;/nowiki&amp;gt;▶ icon beside prototype]&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{…}&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Lion&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;prototype&amp;gt;: {…}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
constructor: class Animal { constructor(name) }​​&lt;br /&gt;
&lt;br /&gt;
eat: function eat()​​&lt;br /&gt;
&lt;br /&gt;
sleep: function sleep()​​&lt;br /&gt;
&lt;br /&gt;
walk: walk()&lt;br /&gt;
|| Here, we can verify that when the '''class '''was '''executed, '''the '''object '''has been '''returned'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the '''object '''internally has '''prototypes''': '''eat''', '''sleep '''and '''walk'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Lion can Eat!'''&lt;br /&gt;
|| On '''executing''' the '''eat method''', we see '''Lion can eat '''being printed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, '''this.name''' refers to '''Lion.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because '''Lion''' was the '''name passed''' while '''executing''' the '''class constructor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Inheritance&lt;br /&gt;
|| Technically, '''Inheritance '''is a concept of '''inheriting''' the '''parent class properties'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''JS''', we do that using '''extends keyword.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When using '''extends '''to invoke the '''parent class constructor, '''we need to use '''super keyword.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us take an example and understand '''Inheritance''' better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Animal {&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
this.name = name;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
walk() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Walk!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
eat() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Eat!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sleep() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Sleep!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Human extends Animal {&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
super(name);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
think() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot;can Think!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const a1 = new Animal(&amp;quot;Lion&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
console.log(a1);&lt;br /&gt;
&lt;br /&gt;
a1.eat();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const h1 = new Human(&amp;quot;Jayesh&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
console.log(h1);&lt;br /&gt;
&lt;br /&gt;
h1.eat();&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Animal {&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
this.name = name;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
walk() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Walk!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
eat() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Eat!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sleep() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Sleep!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| I have not changed anything in the '''Animal class'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const a1 = new Animal(&amp;quot;Lion&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
console.log(a1);&lt;br /&gt;
&lt;br /&gt;
a1.eat();&lt;br /&gt;
|| And, there's no change in this part too.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Human extends Animal {&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
super(name);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
think() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot;can Think!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have '''declared''' a '''class''' '''Human.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Human extends Animal&lt;br /&gt;
|| I’m '''extending''' the '''Human class''' with '''Animal, '''to '''inherit''' all the '''properties''' of '''Animal.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''Human''' can also '''eat''', '''sleep '''and '''walk.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, instead of replicating everything in '''Human class '''again, I '''extend''' it with the '''Animal class'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
super(name);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Let’s look inside the '''constructor'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I '''pass name''' because a '''Human '''will also have a '''name.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
super(name);&lt;br /&gt;
|| It’s not necessary for me to '''bind '''the '''variable '''again.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Instead, I '''pass''' the '''name '''to '''super method'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It’s an '''inbuilt method''' in '''JS, '''which '''executes''' the parent '''class constructor.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, as we have '''extended''' the '''Human class '''with '''Animal, '''so '''Animal '''is the '''parent class'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
think() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot;can Think!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| If there are any specific '''functions '''which '''Human '''need to have, it’s written inside the '''Human class.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, I have '''declared''' a '''think method''', because a '''Human '''can '''think.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const h1 = new Human(&amp;quot;Jayesh&amp;quot;);&lt;br /&gt;
|| Here, I execute the '''Human class '''by''' passing Jayesh '''as '''name'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(h1);&lt;br /&gt;
|| And to verify what '''Human class returns''', I’m '''logging h1''' here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
h1.eat();&lt;br /&gt;
|| To verify if '''h1''' can'''execute ''' the''' Animal class method, '''I’m '''executing''' the '''Animal class eat method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
Object { name: &amp;quot;Lion&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Lion can Eat! &lt;br /&gt;
|| Here, there is no change in the '''output'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Click on ▶ icon beside Object and again click on &amp;lt;/nowiki&amp;gt;▶ icon beside prototype, and again click on ▶ icon beside prototype]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{…}&lt;br /&gt;
&lt;br /&gt;
​&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Jayesh&amp;quot;&lt;br /&gt;
&lt;br /&gt;
​&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;prototype&amp;gt;: {…}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
​​&lt;br /&gt;
&lt;br /&gt;
constructor: class Human { constructor(name) }​​&lt;br /&gt;
&lt;br /&gt;
think: function think()​​&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;prototype&amp;gt;: {…}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
​​​&lt;br /&gt;
&lt;br /&gt;
constructor: class Animal { constructor(name) }​​​&lt;br /&gt;
&lt;br /&gt;
eat: function eat()​​​&lt;br /&gt;
&lt;br /&gt;
sleep: function sleep()​​​&lt;br /&gt;
&lt;br /&gt;
walk: function walk()&lt;br /&gt;
|| Observe here,''' h1''' has access to '''Human class constructor '''and '''methods.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Along with that, it even has access to '''Animal class methods'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This proves that we have inherited all the '''properties''' from the '''parent class'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Jayesh can Eat!'''&lt;br /&gt;
|| By '''executing''' the '''parent class method''', we can verify that '''h1 '''can '''execute''' the '''parent class method''' too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let’s create another '''class '''and verify a deep level '''inheritance '''too.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Animal {&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
this.name = name;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
walk() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Walk!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
eat() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Eat!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sleep() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Sleep!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Human extends Animal {&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
super(name);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
think() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot;can Think!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Bird extends Human {&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
super(name);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fly() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Fly!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const a1 = new Animal(&amp;quot;Lion&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
console.log(a1);&lt;br /&gt;
&lt;br /&gt;
a1.eat();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const h1 = new Human(&amp;quot;Jayesh&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
console.log(h1);&lt;br /&gt;
&lt;br /&gt;
h1.eat();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const b1 = new Bird(&amp;quot;Pigeon&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
console.log(b1);&lt;br /&gt;
&lt;br /&gt;
b1.think();&lt;br /&gt;
&lt;br /&gt;
b1.eat();&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Animal {&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
this.name = name;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
walk() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Walk!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
eat() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Eat!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
sleep() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Sleep!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Human extends Animal {&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
super(name);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
think() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot;can Think!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| I have not changed anything in '''Animal '''or '''Human classes'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const a1 = new Animal(&amp;quot;Lion&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
console.log(a1);&lt;br /&gt;
&lt;br /&gt;
a1.eat();&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const h1 = new Human(&amp;quot;Jayesh&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
console.log(h1);&lt;br /&gt;
&lt;br /&gt;
h1.eat();&lt;br /&gt;
|| And there's no change in this part too.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Bird extends Human {&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
super(name);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fly() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Fly!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have created a '''class''' '''Bird.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class Bird extends Human&lt;br /&gt;
|| And '''extended''' it to the '''Human class.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
constructor(name) {&lt;br /&gt;
&lt;br /&gt;
super(name);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| On invoking the '''super method''' in the '''constructor, '''It invokes the '''Human class constructor.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And, since '''Human class '''is '''extended''', '''Animal class constructor '''will also be '''called'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fly() {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name + &amp;quot; can Fly!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| '''Birds '''have the ability to '''fly '''and along with that they can '''eat''', '''sleep''', '''walk '''and '''think.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, I have added a '''fly method.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const b1 = new Bird(&amp;quot;Pigeon&amp;quot;);&lt;br /&gt;
|| Here, I’m invoking the '''Bird class '''by''' passing Pigeon '''as '''name.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(b1);&lt;br /&gt;
|| I’m '''logging b1 '''to verify what is being '''returned'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
b1.think();&lt;br /&gt;
|| To check whether I have access to '''Human class, '''I’m '''executing '''the '''Human class method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
b1.eat();&lt;br /&gt;
|| To check whether I have access to '''Animal class, '''I’m '''executing '''the '''Animal class method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Object { name: &amp;quot;Lion&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Lion can Eat! &lt;br /&gt;
&lt;br /&gt;
Object { name: &amp;quot;Jayesh&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Jayesh can Eat! &lt;br /&gt;
|| Here, there’s no change in the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Click on ▶ icon beside Object and again click on &amp;lt;/nowiki&amp;gt;▶ icon beside prototype, and again click on ▶ icon beside prototype, and again click on ▶ icon beside prototype]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{…}&lt;br /&gt;
&lt;br /&gt;
​&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Pigeon&amp;quot;&lt;br /&gt;
&lt;br /&gt;
​&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;prototype&amp;gt;: {…}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
​​&lt;br /&gt;
&lt;br /&gt;
constructor: class Bird { constructor(name) }​​&lt;br /&gt;
&lt;br /&gt;
fly: function fly()​​&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;prototype&amp;gt;: {…}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
​​​&lt;br /&gt;
&lt;br /&gt;
constructor: class Human {&lt;br /&gt;
&lt;br /&gt;
constructor(name) }​​​&lt;br /&gt;
&lt;br /&gt;
think: function think()​​​&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;prototype&amp;gt;: {…}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
​​​​&lt;br /&gt;
&lt;br /&gt;
constructor: class Animal { constructor(name) }​​​​&lt;br /&gt;
&lt;br /&gt;
eat: function eat()​​​​&lt;br /&gt;
&lt;br /&gt;
sleep: function sleep()​​​​&lt;br /&gt;
&lt;br /&gt;
walk: function walk()&lt;br /&gt;
|| Now observe here, we have access to '''Bird class, Human class '''and '''Animal class '''too.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Pigeon can Think!'''&lt;br /&gt;
|| The '''Human class method''' is also '''executed''' without any errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thus we verify that '''b1''' can '''execute''' the '''Human class method''' too.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Pigeon can Eat!'''&lt;br /&gt;
|| The '''Animal class method''' is also '''executed''' without any errors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hence we verify''' b1''' can '''execute''' the '''Animal class method''' too.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* '''Classes '''and&lt;br /&gt;
* '''Inheritance '''in '''JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
* Open the file '''assignment.js''' which you have created earlier.&lt;br /&gt;
* Clear the existing code.&lt;br /&gt;
* Create a '''class Car'''&lt;br /&gt;
* Create the '''methods engine '''and '''wheels '''in the '''class''' '''Car'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| &lt;br /&gt;
* Create a '''class '''called '''ElectricCar '''and inherit the '''properties '''of '''Car class'''&lt;br /&gt;
* Create a '''method battery '''in the '''class''' '''ElectricCar'''&lt;br /&gt;
* '''Log''' the '''method''' name in all the three '''methods'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| &lt;br /&gt;
* Create an '''object ec1 '''using '''ElectricCar '''and then '''execute Car methods''' using '''ec1'''&lt;br /&gt;
* Open the file '''MyPage.html''' in a '''web browser'''.&lt;br /&gt;
* Observe the output in the '''browser’s console.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide:  Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh and this is Praveen signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C4/Array-methods-in-JS/English</id>
		<title>JavaScript/C4/Array-methods-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C4/Array-methods-in-JS/English"/>
				<updated>2021-06-08T14:59:19Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Array Methods&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, callback, parameter, method, loop&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and welcome to the spoken tutorial on “'''Array Methods in JS'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* Different '''Array Methods '''&lt;br /&gt;
* Advanced '''Array Loops '''in''' JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
&lt;br /&gt;
However, you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Array Methods&lt;br /&gt;
|| To make development work easy, we can use many of the '''inbuilt array methods '''of '''JS'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We’ll learn a few of them in this tutorial.&lt;br /&gt;
* '''length '''- '''Returns''' the length of the '''Array'''&lt;br /&gt;
* '''push '''- Adds a value at the end of the '''Array'''&lt;br /&gt;
* '''pop '''- Removes a value from the end of the '''Array'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us take an example for each of these '''methods''' and understand them better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS '''-&amp;gt;''' index.html &amp;amp; main.js'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Then open the files '''index.html''' and '''main.js''' as explained in the earlier tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this demonstration, I have already opened the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These files are available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt;Array Methods&amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src = &amp;quot;main.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, replace the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press: Alt + L and Alt + O &lt;br /&gt;
|| Save the file and start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''Console''' tab&lt;br /&gt;
|| In the '''web browser''', open the '''Browser developer tools''' panel and go to the '''Console tab'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const arr = [1, 2, 3];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(arr.length);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const arr = [1, 2, 3];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, I have created a '''variable''' named '''arr '''and assigned an '''array '''with '''elements 1, 2 '''and '''3.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(arr.length);&lt;br /&gt;
|| And in the '''console,''' I am '''logging arr.length''', which prints the length of the '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
'''3'''&lt;br /&gt;
|| Here we see 3.&lt;br /&gt;
&lt;br /&gt;
That’s because there are '''3 elements''', and so the length of the '''array '''is '''3.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, let’s see the '''push method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const arr = [1, 2, 3];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(arr.push(4));&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(arr);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
arr.push(4);&lt;br /&gt;
|| I’m using the '''push method '''to add an '''element''' to the end of the '''array'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''push method '''accepts values to '''push''' to the '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here I’m '''passing''' only one value which is '''4.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can give multiple comma-separated values too.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(arr.push(4));&lt;br /&gt;
|| The '''push method '''returns the''' length '''of the '''array'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To verify the '''length''', I’m using the '''push method''' inside the '''log statement'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
'''4'''&lt;br /&gt;
|| In the '''console''', we can see that the '''length '''of the '''array '''after '''pushing''' the value, is seen as '''4.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;Array(4) [ 1, 2, 3, 4 ]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
|| Observe here that the value '''4''' is added at the end of the '''array'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Next, let’s use the '''pop method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const arr = [1, 2, 3];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(arr.pop());&lt;br /&gt;
&lt;br /&gt;
console.log(arr);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
arr.pop();&lt;br /&gt;
|| Here, I used the '''pop method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''pop '''is an '''inbuilt function call '''that deletes one value at the end of the '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(arr.pop());&lt;br /&gt;
|| The '''pop method returns''' the '''deleted value '''in the '''array'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To verify the '''value''', I’m using the '''pop method''' inside the '''log statement.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
'''3'''&lt;br /&gt;
|| In the '''console''', we can see that the '''pop method''' has successfully removed the last '''element''' from the '''array'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, let’s learn some more '''array methods'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Array Methods&lt;br /&gt;
|| &lt;br /&gt;
* '''indexOf '''- '''Returns''' the '''index '''of the value in the '''Array'''&lt;br /&gt;
* '''shift '''- Removes a value from the beginning of the '''Array'''&lt;br /&gt;
* '''unShift '''- Adds a value to the beginning of the '''Array'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us take an example for each of these '''methods''' and understand them better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const arr = [1, 2, 3];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(arr.indexOf(2));&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(arr.indexOf(2));&lt;br /&gt;
|| Here, I’m using the '''indexOf method '''and '''passing''' the value''' 2''' to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the '''array '''has the value '''2''', then it will '''return''' the '''indexOf 2.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the value is not available in the '''array''', then it will '''return -1.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
'''1'''&lt;br /&gt;
|| Since the '''element''' is present in the '''array, index 1 '''is '''returned''' and printed in the '''log.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Next, let’s see the''' unshift method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const arr = [1, 2, 3];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
arr.unshift(0);&lt;br /&gt;
&lt;br /&gt;
console.log(arr);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
arr.unshift(0);&lt;br /&gt;
|| Here, I’m using the '''unshift method '''and '''passing''' the value '''0''' to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This '''method '''adds the value at the beginning of the '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can '''pass''' comma-separated values too if you want to add more.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;Array(4) [ 0, 1, 2, 3 ]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
|| As you can see here, the value is added at the beginning of the '''array.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Next, let’s see the '''shift method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const arr = [1, 2, 3];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
arr.shift();&lt;br /&gt;
&lt;br /&gt;
console.log(arr);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
arr.shift();&lt;br /&gt;
|| Here, I’m using the '''shift method''', which deletes one value from the beginning of the '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;Array [ 2, 3 ]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
|| Notice here that 1 is removed from the '''array'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s continue to learn some more '''array methods'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Array Methods&lt;br /&gt;
|| &lt;br /&gt;
* '''forEach '''- '''Loops''' over the '''Array'''&lt;br /&gt;
* '''map '''- '''Loops''' over the '''Array '''and '''returns''' the '''modified Array'''&lt;br /&gt;
* '''filter '''- '''Loops''' over the '''Array '''with a '''condition''' and '''returns''' the '''filtered Array'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us look at an example for each of these '''methods''' and understand them better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const arr = [1, 2, 3];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
arr.forEach((item) =&amp;gt; console.log(item));&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
arr.forEach((item) =&amp;gt; console.log(item));&lt;br /&gt;
|| Here, I’m using a '''forEach method '''to '''loop''' over the '''array'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is an advanced '''loop''' compared to a normal '''for loop'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Its execution is faster compared to a '''for loop.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''forEach '''accepts a '''callback function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(item) =&amp;gt; &lt;br /&gt;
|| Here, I will '''pass''' any '''variable '''name as a '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Say '''item''', which''' '''refers to the value in each and every iteration.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(item);&lt;br /&gt;
|| On every iteration, I '''log''' the value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1'''&lt;br /&gt;
&lt;br /&gt;
'''2'''&lt;br /&gt;
&lt;br /&gt;
'''3'''&lt;br /&gt;
|| Look here. The '''array '''has '''looped''' over.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The values in the '''array '''are printed one after the other.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Next, let’s learn about the '''map method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const arr = [1, 2, 3];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
const modifiedArr = arr.map((item) =&amp;gt; item * 2);&lt;br /&gt;
&lt;br /&gt;
console.log(modifiedArr);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const modifiedArr = arr.map((item) =&amp;gt; item * 2);&lt;br /&gt;
|| Here, I’m using the '''map method'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Map Method&lt;br /&gt;
|| '''map method '''is also very similar to '''forEach method.'''&lt;br /&gt;
* It accepts a '''callback function''', &lt;br /&gt;
* '''Loops''' over each and every value in the '''array'''&lt;br /&gt;
* Modifies it, and then '''returns''' the modified '''array'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const modifiedArr = arr.map((item) =&amp;gt; item * 2);&lt;br /&gt;
|| I’m storing the modified '''array '''in the '''variable''' '''modifiedArr'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(modifiedArr);&lt;br /&gt;
|| In the '''console''', I’m '''logging''' the '''modifiedArr''' '''variable '''for verification.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;Array(3) [ 2, 4, 6 ]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
|| Observe the '''console'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''map method''' has modified each and every value in the '''array '''by multiplying it by''' 2.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And, it has '''returned''' the modified '''array.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Next, let's learn about the '''filter method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const arr = [1, 2, 3, 4];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const filteredArr = arr.filter((item) =&amp;gt; item &amp;lt; 3);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(filteredArr);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const filteredArr = arr.filter((item) =&amp;gt; item &amp;lt; 3);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, I’m using the '''filter method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''filter method '''filters the '''array '''with a '''condition''' and '''returns '''a filtered '''array'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similar to '''forEach''', even the '''filter method '''accepts a '''callback function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''filter method loops''' over and for each and every value the '''function '''gets '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''filter method '''will not '''modify '''the original '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;item &amp;lt; 3&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, inside the '''callback function''', I have mentioned a '''condition'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the '''condition''' is satisfied, the value is '''returned.''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Else it won't '''return''' anything.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| const filteredArr =&lt;br /&gt;
|| The '''returned''' values are stored in the '''variable filteredArr'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(filteredArr);&lt;br /&gt;
|| Here, I’m '''logging''' the '''filteredArr variable''' for verification.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;Array [ 1, 2 ]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
|| In the '''console''', we have the '''filtered array'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only values that are less than 3 are filtered and are displayed here as per the condition we set.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this, we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* Different''' Array Methods '''and&lt;br /&gt;
* Advanced '''Array Loops '''in''' JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Highlight]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array&lt;br /&gt;
|| We have covered only a few '''array methods '''in this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To learn more visit the link shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
* Open the file '''assignment.js''' which you have created earlier.&lt;br /&gt;
* Clear the existing code.&lt;br /&gt;
* '''Declare''' a '''variable marks'''&lt;br /&gt;
* Assign an '''array '''to '''marks'''&lt;br /&gt;
* '''The array''' should contain 10 random numbers&lt;br /&gt;
* Filter the '''marks array''' and display the '''marks '''divisible by 2 and 3&lt;br /&gt;
* Open the file '''MyPage.html''' in a web browser.&lt;br /&gt;
* Observe the output in the '''browser’s console'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide:  Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by the Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh and this is Praveen signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C4/Arrow-function-in-JS/English</id>
		<title>JavaScript/C4/Arrow-function-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C4/Arrow-function-in-JS/English"/>
				<updated>2021-06-08T14:29:44Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Arrow Functions&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, this, Arrow, function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and welcome to the spoken tutorial on “'''Arrow Function in JS'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* '''setInterval'''&lt;br /&gt;
* '''clearInterval'''&lt;br /&gt;
* '''setTimeout '''and&lt;br /&gt;
* '''Arrow Functions '''in''' JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Arrow Function&lt;br /&gt;
|| &lt;br /&gt;
* '''Arrow Functions '''are introduced in '''ES6'''&lt;br /&gt;
* This is also called as '''Fat Arrow Function '''because we use a '''fat arrow '''as '''syntax'''&lt;br /&gt;
* Doesn’t have '''‘this’ context '''- Does not have it’s own '''binding '''&lt;br /&gt;
* whereas the normal '''function '''has '''‘this’ context'''.&lt;br /&gt;
* The best part of '''arrow functions''' is, it avoids confusion of ‘'''this’ context '''in '''callbacks'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS '''-&amp;gt;''' index.html &amp;amp; main.js'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Then open the files '''index.html''' and '''main.js''' as explained in the earlier tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this demonstration, I have already opened the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These files are available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt;Arrow Functions&amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;main.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, replace the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press: Alt + L and Alt + O &lt;br /&gt;
|| Save the file and start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''Console''' tab&lt;br /&gt;
|| In the '''web browser''', open the '''Browser developer tools''' panel and go to the '''console tab'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Display() {&lt;br /&gt;
&lt;br /&gt;
this.speed = 0;&lt;br /&gt;
&lt;br /&gt;
var self = this;&lt;br /&gt;
&lt;br /&gt;
var stop = setInterval(function () {&lt;br /&gt;
&lt;br /&gt;
self.speed++;&lt;br /&gt;
&lt;br /&gt;
console.log(self.speed);&lt;br /&gt;
&lt;br /&gt;
}, 300);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setTimeout(function () {&lt;br /&gt;
&lt;br /&gt;
clearInterval(stop);&lt;br /&gt;
&lt;br /&gt;
}, 5000);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
var d1 = new Display();&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var d1 = new Display();&lt;br /&gt;
|| Here, I’m making a '''function call''' with '''new binding.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Display() {&lt;br /&gt;
&lt;br /&gt;
this.speed = 0;&lt;br /&gt;
&lt;br /&gt;
var self = this;&lt;br /&gt;
&lt;br /&gt;
var stop = setInterval(function () {&lt;br /&gt;
&lt;br /&gt;
self.speed++;&lt;br /&gt;
&lt;br /&gt;
console.log(self.speed);&lt;br /&gt;
&lt;br /&gt;
}, 300);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setTimeout(function () {&lt;br /&gt;
&lt;br /&gt;
clearInterval(stop);&lt;br /&gt;
&lt;br /&gt;
}, 5000);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I’m '''declaring''' a '''display function''',&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are already aware that the normal '''function '''has its own '''scope'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this.speed = 0;&lt;br /&gt;
|| In the '''functional scope, '''I have '''declared speed property '''and assigned it to''' 0'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var self = this;&lt;br /&gt;
|| Here, I’m creating a '''variable self''' and assigning ‘'''this’ context '''to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, ‘'''this’ '''refers to the '''scope '''of the '''display function''' which can be used whenever necessary.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setInterval(function () {&lt;br /&gt;
&lt;br /&gt;
self.speed++;&lt;br /&gt;
&lt;br /&gt;
console.log(self.speed);&lt;br /&gt;
&lt;br /&gt;
}, 300);&lt;br /&gt;
|| In '''JS '''we have an '''inbuilt method setInterval '''and it accepts two '''parameters.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One a '''callback function '''and the other is the '''time interval''' in '''milliseconds'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the specified '''time interval''', the '''callback function '''gets '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Until we '''clear '''the '''interval''', the '''execution''' of '''setInterval '''won’t stop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function () {&lt;br /&gt;
&lt;br /&gt;
self.speed++;&lt;br /&gt;
&lt;br /&gt;
console.log(self.speed);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| This is a '''callback function '''or you can even call it as an '''anonymous function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You are already aware that '''function''' has its own '''scope''' and the new '''scope''' starts here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
self.speed++;&lt;br /&gt;
|| Here, I’m increasing the value of '''speed''', which is '''declared''' in the '''display function. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So as to access '''display function scope''', I’m using the '''self keyword'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By now, you should have understood the reason.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That is why I have '''declared '''the '''variable self '''and assigned the '''context'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If I use '''this.speed''', I will have access to the '''scope''' of the '''callback function''', which is not needed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(self.speed);&lt;br /&gt;
|| In the '''console''', I will '''log''' the value of '''speed.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
300&lt;br /&gt;
|| Here, I have kept '''300 milliseconds '''as the time '''interval.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, the '''function''' executes after '''300 milliseconds'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setTimeout(function () {&lt;br /&gt;
&lt;br /&gt;
clearInterval(stop);&lt;br /&gt;
&lt;br /&gt;
}, 5000);&lt;br /&gt;
|| In '''JS''', '''setTimeout '''is also an '''inbuilt function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It takes a '''callback function''' and time in '''milliseconds '''as '''parameters'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is unlike the '''setInterval method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''setTimeout method '''will execute the '''callback function '''once after the specified time.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
clearInterval(stop);&lt;br /&gt;
|| Let’s go inside the '''callback function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I’m clearing the '''interval '''by '''passing''' the '''stop variable''', which was assigned to '''setInterval method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
5000&lt;br /&gt;
|| '''5000 milliseconds''' is equivalent to''' 5 seconds'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, the '''setTimeout callback function '''will be executed after '''5 seconds. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now , let’s see the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1'''&lt;br /&gt;
&lt;br /&gt;
'''2'''&lt;br /&gt;
&lt;br /&gt;
'''3'''&lt;br /&gt;
&lt;br /&gt;
'''4 . . . . . . . . . . . . . 16'''&lt;br /&gt;
|| Observe here, we can see numbers from 1 to 16.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The value of '''speed''' will not be incremented after that because the '''interval '''is cleared after 5 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It’s a simple math calculation: 5000/300 = 16 point something.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next execution will happen at 5100 milliseconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because we cleared the '''interval''' at 5000 milliseconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We don’t see the next number printed in the '''console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| So far, we just learnt about '''setInterval, setTimeout '''and '''clearInterval'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next let’s learn the '''display method '''using '''arrow function''' and understand the difference.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Display() {&lt;br /&gt;
&lt;br /&gt;
this.speed = 0;&lt;br /&gt;
&lt;br /&gt;
var stop = setInterval(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
this.speed++;&lt;br /&gt;
&lt;br /&gt;
console.log(this.speed);&lt;br /&gt;
&lt;br /&gt;
}, 300);&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; clearInterval(stop), 5000);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var d1 = new Display();&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var d1 = new Display();&lt;br /&gt;
|| Here, I do a similar '''function call''' like done in the previous example.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Display() {&lt;br /&gt;
&lt;br /&gt;
this.speed = 0;&lt;br /&gt;
&lt;br /&gt;
var stop = setInterval(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
this.speed++;&lt;br /&gt;
&lt;br /&gt;
console.log(this.speed);&lt;br /&gt;
&lt;br /&gt;
}, 300);&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; clearInterval(stop), 5000);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In this '''function '''declaration, I have created a '''speed property '''in the '''display function context'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is similar to the one shown in the previous example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''setInterval function '''has some major changes, which I’ll be explaining to you.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
this.speed++;&lt;br /&gt;
&lt;br /&gt;
console.log(this.speed);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, the '''callback function '''is an '''arrow function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice the '''fat arrow '''in the code as '''syntax '''for the '''arrow function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The''' brackets''' are used for '''pass'''ing the''' parameters'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I told you in the beginning that for '''arrow functions''' we don't have a new '''scope.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''scope '''of the '''display function''' is the same as the '''scope '''of the '''arrow function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this.speed++;&lt;br /&gt;
|| So, I’m able to access '''this.speed''' using the '''this keyword''' itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unlike the previous example, I did not store the '''context '''in a '''variable '''to use it elsewhere.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Assigning a '''context '''to a '''variable '''and then using it, will create a lot of confusion in huge programs.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(this.speed);&lt;br /&gt;
|| In the '''console''', I will '''log''' the value of '''speed'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; clearInterval(stop), 5000);&lt;br /&gt;
|| Here, notice '''setTimeout.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have used the '''arrow function''' for the '''callback function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And I haven’t used open and close curly braces here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If I have a single '''statement, '''I can directly write the instruction within brackets.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the advantage of the '''arrow function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let's see the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''1'''&lt;br /&gt;
&lt;br /&gt;
'''2'''&lt;br /&gt;
&lt;br /&gt;
'''3'''&lt;br /&gt;
&lt;br /&gt;
'''4 . . . . . . . 16'''&lt;br /&gt;
|| We get the same output here with the use of the '''arrow function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The advantage is that we removed unnecessary '''self-declarations''' of the '''variable '''for '''context.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Plus we avoided a lot of confusion and wrote a cleaner code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* '''setInterval'''&lt;br /&gt;
* '''clearInterval'''&lt;br /&gt;
* '''setTimeout '''and&lt;br /&gt;
* '''Arrow Function '''in''' JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
* Open the file '''assignment.js''' which you have created earlier.&lt;br /&gt;
* Clear the existing code.&lt;br /&gt;
* Display ‘'''Welcome to Spoken Tutorials'''’ message in the '''console '''after''' 5 seconds'''&lt;br /&gt;
* Use '''setTimeout '''and '''arrow function''' as '''callback function'''&lt;br /&gt;
* Open the file '''MyPage.html''' in a web browser.&lt;br /&gt;
* Observe the output in the browser’s '''console'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide:  Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh and this is Praveen signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C4/this-Keyword-in-JS/English</id>
		<title>JavaScript/C4/this-Keyword-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C4/this-Keyword-in-JS/English"/>
				<updated>2021-06-08T14:13:58Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: this keyword&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, this, binding, implicit, explicit, window&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and welcome to the spoken tutorial on “'''this keyword in JS'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* '''this keyword '''and&lt;br /&gt;
* different types of '''this keyword bindings '''in''' JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
&lt;br /&gt;
However, you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: ‘this’ keyword in JS&lt;br /&gt;
|| &lt;br /&gt;
* Technically, '''this '''is an '''Object'''. &lt;br /&gt;
* '''this keyword '''- refers to the context&lt;br /&gt;
* '''this keyword '''can be a '''global object, function, class''' or '''variable'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: ‘this’ keyword in JS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| '''this keyword''' depends upon '''binding'''.&lt;br /&gt;
&lt;br /&gt;
* '''Window Binding'''&lt;br /&gt;
* '''Implicit Binding'''&lt;br /&gt;
* '''Explicit Binding'''&lt;br /&gt;
* '''New Binding'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: ‘this’ keyword in JS&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| '''Explicit Binding''' has 3 methods:&lt;br /&gt;
&lt;br /&gt;
* '''Call'''&lt;br /&gt;
* '''Apply'''&lt;br /&gt;
* '''bind'''&lt;br /&gt;
&lt;br /&gt;
Now, let us take an example for each of those and understand them better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS '''-&amp;gt;''' index.html &amp;amp; main.js'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Then open the files '''index.html''' and '''main.js''' as explained in the earlier tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this demonstration, I have already opened the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These files are available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt;'this' Keyword&amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;main.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, replace the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press: Alt + L and Alt + O &lt;br /&gt;
|| Save the file and Start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''developer tools'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Console''' tab&lt;br /&gt;
|| In the '''web browser''', open the '''Browser developer tools''' panel and go to the '''console tab'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
console.log(this);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(this);&lt;br /&gt;
|| Here, '''this '''refers to a '''global object'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And we are '''logging ‘this’ '''in the '''global scope'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Window'''&lt;br /&gt;
|| If you see here, ‘'''this’ keyword '''refers to a '''Window object'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Technically, a '''global object '''is called a '''Window object'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This type of '''binding '''is called '''Window Binding.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var name = &amp;quot;Spoken Tutorials!&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
console.log(this.name);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var name = &amp;quot;Spoken Tutorials!&amp;quot;;&lt;br /&gt;
|| Here, I have '''declared''' a '''variable '''with the '''var keyword.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have assigned the value '''Spoken Tutorials''' to it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(this.name);&lt;br /&gt;
|| Here, with '''log this.name '''I’m '''logging''' the value on the '''console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorials!'''&lt;br /&gt;
|| In the '''console''', we see '''Spoken Tutorials''' being displayed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As ‘'''this’ '''refers to a '''global object''', the '''Window object '''contains everything in the '''browser window'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The ‘name’ variable '''is also a part of the '''Window object'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So,''' this.name''' refers to '''Spoken Tutorials'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Next, let's learn about '''implicit binding'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const empDetails = {&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Jayesh&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
designation: &amp;quot;Instructor&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
displayName: function () {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name); },&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
empDetails.displayName();&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const empDetails = {&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Jayesh&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
designation: &amp;quot;Instructor&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
displayName: function () {&lt;br /&gt;
&lt;br /&gt;
console.log(this.name);&lt;br /&gt;
&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
|| Here, I have '''declared''' a '''variable empDetails '''and assigned an '''object '''to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''object '''contains '''name''', '''designation '''and '''displayName properties.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
displayName: function ()&lt;br /&gt;
|| The '''displayName property '''has an '''anonymous function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(this.name);&lt;br /&gt;
|| I log '''this.name''' inside the '''function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the '''console''', we will see what''' this.name''' refers to.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
empDetails.displayName();&lt;br /&gt;
|| Here, I’m making a normal '''function call '''to '''execute''' the '''anonymous function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Jayesh'''&lt;br /&gt;
|| In the '''console''', we can see that '''this.name''' value is '''Jayesh.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''name '''is the '''property '''in the '''object'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, '''this''' refers to the '''empDetails object'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
empDetails.displayName();&lt;br /&gt;
|| Observe this carefully.&lt;br /&gt;
&lt;br /&gt;
In '''implicit binding, this '''refers to the '''variable '''before the '''period(.)''' in the '''function call.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, here we have '''empDetails variable''' to which ''''this' '''is being '''bound''' to.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Next, let’s learn about '''explicit binding.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const lang = [&amp;quot;HTML&amp;quot;, &amp;quot;CSS&amp;quot;, &amp;quot;JS&amp;quot;];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const empDetails = {&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Jayesh&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display(languages) { console.log(`${this.name} knows ${languages}`);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display.call(empDetails, lang);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;display.call(empDetails, lang[0], lang[1], lang[2]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const lang = [&amp;quot;HTML&amp;quot;, &amp;quot;CSS&amp;quot;, &amp;quot;JS&amp;quot;];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| A '''variable''' named '''lang '''is '''declared '''and''' '''assigned a '''string array.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const empDetails = {&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Jayesh&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
|| Then I have '''declared''' a '''variable empDetails '''and''' '''assigned an '''object '''to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''object '''has a '''property '''called '''name.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display(languages) {&lt;br /&gt;
&lt;br /&gt;
console.log(`${this.name} knows ${languages}`);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I’m '''declaring''' a '''function '''called '''display '''which accepts one '''parameter '''that is '''languages.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside the '''function''', I '''log this.name''' and '''languages.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| The scenario here is to '''execute''' the '''display function '''having '''empDetails '''as a context.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here ‘'''this’ '''should refer to '''empDetails.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display.call(empDetails, lang);&lt;br /&gt;
|| To achieve this, we will learn about the '''call method '''in '''explicit binding.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, the '''call '''accepts any number of '''parameters'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first '''parameter '''is the context to which ''''this' keyword '''refers to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, we are '''executing '''the '''display function '''using a '''call method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And '''passing''' our required context as a first '''parameter.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second '''parameter''' is the one that the '''display function '''accepts.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;display.call(empDetails, lang[0], lang[1], lang[2]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, I’m using the same '''call method''' and '''passing '''the''' array elements''' separately.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have a reason for doing this. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We shall compare this while learning the''' ‘apply’ method''' in '''explicit''' '''binding'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.''''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Jayesh knows HTML,CSS,JS'''&lt;br /&gt;
|| Here, observe the '''log '''carefully.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can verify that in the '''call method''', the first '''parameter '''is the context to which '''this '''refers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That’s the reason we see '''this.name''' is printed as '''Jayesh.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''HTML''', '''CSS '''and '''JS '''are from the '''array '''as we have '''passed''' the '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Jayesh knows HTML'''&lt;br /&gt;
|| Similarly, observe here that only the first '''parameter '''is taken as '''languages.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The rest of the '''parameters''' which are '''passed''' are ignored.&lt;br /&gt;
&lt;br /&gt;
This is because the '''display function '''accepts only one '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Next let’s learn about the '''‘bind’ method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const lang = [&amp;quot;HTML&amp;quot;, &amp;quot;CSS&amp;quot;, &amp;quot;JS&amp;quot;];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const empDetails = {&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Jayesh&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display(languages) {&lt;br /&gt;
&lt;br /&gt;
console.log(`${this.name} knows ${languages}`);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const returnedFn = display.bind(empDetails, lang); &lt;br /&gt;
&lt;br /&gt;
console.log(returnedFn);&lt;br /&gt;
&lt;br /&gt;
returnedFn();&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| '''Bind '''is similar to the '''call method''', with a small change. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const lang = [&amp;quot;HTML&amp;quot;, &amp;quot;CSS&amp;quot;, &amp;quot;JS&amp;quot;];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const empDetails = {&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Jayesh&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display(languages) {&lt;br /&gt;
&lt;br /&gt;
console.log(`${this.name} knows ${languages}`);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| I’m using the same '''variables '''and the '''function '''which were used while explaining the '''call method'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The scenario is also the same.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const returnedFn = display.bind(empDetails, lang); &lt;br /&gt;
|| Here, in the '''bind method''', the first '''parameter '''is the context, which '''this '''refers to.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second '''parameter '''is the one that the '''display function '''accepts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, the '''bind method returns''' a '''function''' which I’m storing in the '''returnedFn variable.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I can '''execute''' the '''returnedFn variable '''anywhere in the '''program''' later.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(returnedFn);&lt;br /&gt;
|| Just to verify what is being '''returned,''' I have put a '''log '''here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
returnedFn();&lt;br /&gt;
|| Then, I’m just '''executing '''the '''returnedFn'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''function display()'''&lt;br /&gt;
|| Here, we can verify that the '''bind method returns''' the '''function '''which can be '''executed''' anywhere.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Jayesh knows HTML,CSS,JS'''&lt;br /&gt;
|| On '''execution''' of the '''returned function''', we get a similar output that the '''call method''' displays.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| By now, we have understood '''call '''and '''bind methods''' in '''explicit binding'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, let’s learn about the '''apply method'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const lang = [&amp;quot;HTML&amp;quot;, &amp;quot;CSS&amp;quot;, &amp;quot;JS&amp;quot;];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const empDetails = {&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Jayesh!&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display(lan1, lan2, lan3) {&lt;br /&gt;
&lt;br /&gt;
console.log(`${this.name} knows ${lan1}, ${lan2} and ${lan3}`);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display.apply(empDetails, lang);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const lang = [&amp;quot;HTML&amp;quot;, &amp;quot;CSS&amp;quot;, &amp;quot;JS&amp;quot;];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const empDetails = {&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Jayesh&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
|| Similar to the previous example, I have '''declared''' two '''variables''', '''lang '''and '''empDetails.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display(lan1, lan2, lan3) {&lt;br /&gt;
&lt;br /&gt;
console.log(`${this.name} knows ${lan1}, ${lan2} and ${lan3}`);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, in the '''display function, '''I’m '''passing''' 3 '''parameters '''and '''logging''' their values'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Recall in the previous example, I had '''passed''' only one '''parameter.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display.apply(empDetails, lang);&lt;br /&gt;
|| Here, I’m using the '''apply method''' and the scenario is the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will '''execute '''the '''display function '''having '''empDetails '''as context.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Like the '''call method''', even in the '''apply method,''' the first '''parameter''' is the context to which '''this '''refers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the '''second parameter '''is what the '''display function accepts '''as a '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Jayesh knows HTML, CSS and JS'''&lt;br /&gt;
|| Here, observe the '''log '''carefully.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can verify that the '''apply method''' is similar to the '''call method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first '''parameter '''being '''passed''' is the context to which '''this '''refers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That’s the reason we see '''this.name''' is printed as '''Jayesh.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''HTML''', '''CSS '''and '''JS '''are from the '''array '''because we have '''passed''' the '''array '''as a '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display(lan1, lan2, lan3) {&lt;br /&gt;
&lt;br /&gt;
console.log(`${this.name} knows ${lan1}, ${lan2} and ${lan3}`);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| If you notice this closely, the '''display function '''has multiple '''parameters.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Whereas we '''pass''' only one '''array parameter '''in the '''apply method''' along with the context.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So here, each '''element '''in the '''array '''is taken as a separate '''variable. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example '''lang1''', '''lang2 '''and '''lang3 '''respectively.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| This is the main difference between '''call '''and '''apply'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So that’s the reason I have been comparing '''‘call’ '''and '''‘apply’ '''in the demonstrated example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, let’s learn about '''new binding.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Student(name) {&lt;br /&gt;
&lt;br /&gt;
this.stuName = name;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const s1 = new Student(&amp;quot;Jayesh&amp;quot;); console.log(s1);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Student(name) {&lt;br /&gt;
&lt;br /&gt;
this.stuName = name;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| When you see this, you might be able to recollect the '''constructor function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This was covered while learning about '''functions'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, I have '''declared''' a '''Student function '''accepting the '''name parameter.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this.stuName = name;&lt;br /&gt;
|| Inside the '''function''', I’ve created a '''property '''with the name '''stuName. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then I have assigned the '''passed name parameter''' to it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const s1 = new Student(&amp;quot;Jayesh&amp;quot;); &lt;br /&gt;
|| Here, I’m making the '''function call '''using '''new keyword''', '''passing Jayesh '''as a '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When I '''pass new keyword''', ‘'''this’ '''refers to a new context and '''returns '''an '''object'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''returned object '''is stored in the '''s1 variable.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(s1);&lt;br /&gt;
|| To verify, I’m '''logging s1 '''in the '''console.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''Browser'''&lt;br /&gt;
|| Save the file and switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Object { stuName: &amp;quot;Jayesh&amp;quot; }'''&lt;br /&gt;
|| In the '''console''', we can see that the '''function '''has created a new '''object '''with '''property stuName.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, ‘'''this’ '''refers to the new context because we are using''' new keyword'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is called the '''new binding'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this, we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* '''‘this’ keyword''' and&lt;br /&gt;
* Different types of '''this keyword bindings '''in''' JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
&lt;br /&gt;
* Open the file '''assignment.js''' which you have created earlier.&lt;br /&gt;
* Clear the existing code.&lt;br /&gt;
* Create a '''student object'''.&lt;br /&gt;
* The''' student object '''should have '''name, department and displayName '''as '''object keys'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| &lt;br /&gt;
* Assign valid '''values '''to '''name '''and '''department keys'''&lt;br /&gt;
* Assign an '''anonymous function '''to '''displayName key'''&lt;br /&gt;
* The '''anonymous function '''should '''log''' the '''name value '''in the '''object '''using this context&lt;br /&gt;
* '''Execute''' the '''displayName function'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| &lt;br /&gt;
* Open the file '''MyPage.html '''in a '''web browser'''.&lt;br /&gt;
* Observe the output in the '''browser’s console'''&lt;br /&gt;
* Guess which '''binding '''this assignment refers to.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide:  Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by the Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh and this is Praveen signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C4/Object-and-Array-Destructuring-in-JS/English</id>
		<title>JavaScript/C4/Object-and-Array-Destructuring-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C4/Object-and-Array-Destructuring-in-JS/English"/>
				<updated>2021-06-07T06:21:14Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Object and Array Destructuring&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, abject, array, shorthands, spread, template literals&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and welcome to the spoken tutorial on “'''Object and Array Destructuring in JS'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* '''Spread Operator'''&lt;br /&gt;
* '''Template Literals'''&lt;br /&gt;
* '''Objects and'''&lt;br /&gt;
* '''Array Destructuring'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
* '''Firefox''' web browser&lt;br /&gt;
&lt;br /&gt;
However, you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files.&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Destructuring&lt;br /&gt;
|| &lt;br /&gt;
* '''Destructuring '''is an''' assignment syntax '''in '''JavaScript'''&lt;br /&gt;
* It makes it possible to unpack values defined in '''Object '''or '''Array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us take an example and understand '''Array '''and '''Object Destructuring''' better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS '''-&amp;gt;''' index.html &amp;amp; main.js'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Then open the files '''index.html''' and '''main.js''' as explained in the earlier tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this demonstration, I have already opened the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These files are available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt;Object and Array Destructuring &amp;amp; Short Hands&amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;main.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, replace the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press: Alt + L and Alt + O &lt;br /&gt;
|| Save the file and start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the '''browser developer tools'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Console''' tab&lt;br /&gt;
|| In the '''web browser''', open the '''Browser developer tools''' panel and go to the '''Console tab'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const arr = [&amp;quot;Jayesh&amp;quot;, 20];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const [name, age] = arr;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(name);&lt;br /&gt;
&lt;br /&gt;
console.log(age);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const arr = [&amp;quot;Jayesh&amp;quot;, 20];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, I have created an '''array '''with the '''variable '''name '''arr'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''array '''has two values - '''Jayesh''' and '''20'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;const [name, age] = arr;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Instead of '''assigning''' the '''array index''' separately for the '''variables name '''and '''age'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can '''pass''' the '''array '''with the '''variable '''name on the left-hand side.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And assign the '''array variable''' on the right-hand side.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(name);&lt;br /&gt;
&lt;br /&gt;
console.log(age);&lt;br /&gt;
|| To verify this, I’m '''logging''' the '''name '''and '''age variables '''on the '''console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Jayesh'''&lt;br /&gt;
&lt;br /&gt;
'''20'''&lt;br /&gt;
|| The output verifies that the '''array '''values are '''assigned''' to the '''name '''and '''age variables.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is called '''destructuring '''of '''arrays '''in '''JS'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Next, let's learn how to '''destructure '''an '''object'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const obj = { name: &amp;quot;Jayesh&amp;quot;, age: 20 };&lt;br /&gt;
&lt;br /&gt;
const { name, age } = obj;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(name);&lt;br /&gt;
&lt;br /&gt;
console.log(age);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const obj = { name: &amp;quot;Jayesh&amp;quot;, age: 20 };&lt;br /&gt;
|| Here, I have '''declared''' an '''object '''with the '''variable '''name '''obj.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This '''object '''has 2 '''properties-''' '''name '''and '''age.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const { name, age } = obj;&lt;br /&gt;
|| This is similar to the '''array '''example which we have seen before'''. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We assign the '''object property''' values to the '''name '''and '''age variables'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then we '''pass''' an '''object expression''' on the left-hand side.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And assign the '''object variable''' on the right-hand side.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(name);&lt;br /&gt;
&lt;br /&gt;
console.log(age);&lt;br /&gt;
|| To verify this, I’m '''logging name''' and '''age variables''' separately on the '''console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Jayesh'''&lt;br /&gt;
&lt;br /&gt;
'''20'''&lt;br /&gt;
|| The output verifies that the '''object '''is '''destructured'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Here, we have 2 '''properties.'''&lt;br /&gt;
&lt;br /&gt;
And we have '''passed''' 2 '''variable '''names in both of our '''array '''and '''object '''examples.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let’s think of a scenario where we have '''3 properties.''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We need to assign the '''first property '''to the '''name variable.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the rest of the '''properties '''to the '''details variable'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To achieve this, we have a concept called the '''spread operator.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Object Destructing&lt;br /&gt;
|| For '''Objects''', the '''variable''' name''' '''should be the same as the '''object property''' name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Otherwise, the '''variable '''name will be assigned to '''undefined'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Spread Operator&lt;br /&gt;
|| The '''syntax '''of''' Spread Operator '''is very simple. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
('''…) '''three dots followed by the '''variable '''name.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const obj = {&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Jayesh&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
age: 20,&lt;br /&gt;
&lt;br /&gt;
location: &amp;quot;Bangalore&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
const { name, ...details } = obj;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(name);&lt;br /&gt;
&lt;br /&gt;
console.log(details);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const obj = {&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Jayesh&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
age: 20,&lt;br /&gt;
&lt;br /&gt;
location: &amp;quot;Bangalore&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
|| Here, I have '''declared''' an '''object '''with''' 3''' '''properties''' as per our discussed scenario.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const { '''name''', ...details } = obj;&lt;br /&gt;
|| To assign the '''name property '''value in the '''object''' to the '''name variable''', I’m '''declaring the name '''here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''...'''details&lt;br /&gt;
|| And, to store the rest of the two '''properties''' in the '''details variable''', I’m using a '''spread operator'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As discussed, the usage of the '''spread operator''' is very simple.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is'''...''' (three dots) followed by the '''details variable '''name.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(name);&lt;br /&gt;
&lt;br /&gt;
console.log(details);&lt;br /&gt;
|| To verify, I’m '''logging''' both the '''variables '''separately.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Jayesh'''&lt;br /&gt;
|| Here is the verification for the newly created '''name variable.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The value in the '''name '''property of the '''object '''is assigned as '''Jayesh'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Object { age: 20, location: &amp;quot;Bangalore&amp;quot; }'''&lt;br /&gt;
|| And the rest of the '''properties '''in '''objects '''are assigned to '''details'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Next, let’s learn about '''Template literals''' which is a better way to '''concatenate strings'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Template Literals&lt;br /&gt;
|| &lt;br /&gt;
* '''Template literals''' are written using open and closed '''backticks'''.&lt;br /&gt;
* Here is an example.&lt;br /&gt;
* '''Variables '''values can be displayed using''' ${} ('''the '''dollar''' symbol and curly braces''')''' in a '''string'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display({ name, location: city }) {&lt;br /&gt;
&lt;br /&gt;
console.log(`${name} lives in ${city}`);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display({ name: &amp;quot;Jayesh&amp;quot;, location: &amp;quot;Bangalore&amp;quot; });&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display({ name, location: city }) {&lt;br /&gt;
&lt;br /&gt;
console.log(`${name} lives in ${city}`);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have '''declared''' a '''function '''named '''display''', which accepts an '''object '''as a '''parameter.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{name, location: city }&lt;br /&gt;
|| The '''passed object '''should have the '''name '''and '''location '''as the '''properties.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
location: city&lt;br /&gt;
|| Here, I have a requirement to access the '''location property '''as '''city variable.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I assign '''city '''to '''location '''as a '''variable '''name, to access inside the '''function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, in order to achieve that, I can '''cast '''the '''variable '''using ''': colon'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(`${name} lives in ${city}`);&lt;br /&gt;
|| To verify this, I have '''logged''' a '''string '''that accepts '''name '''and '''city variables'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
`${name} lives in ${city}`&lt;br /&gt;
|| As mentioned, I’m writing my '''string''' using '''backtick '''here to '''concatenate variables''' and '''strings'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the '''variable '''names are wrapped up with '''$ dollar''' symbol and curly braces'''{}.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
${city}&lt;br /&gt;
|| Here, I’m not using '''location '''anymore, as the '''location''' is cast as '''city.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display({ name: &amp;quot;Jayesh&amp;quot;, location: &amp;quot;Bangalore&amp;quot; });&lt;br /&gt;
|| Here, I have made a '''function call '''by''' passing''' an '''object '''having a '''name '''and '''location '''as '''parameters'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
Switch to '''browser'''&lt;br /&gt;
|| Save the file and Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Jayesh lives in Bangalore'''&lt;br /&gt;
|| The '''console''' output verifies that the '''string''' has '''concatenated''' properly using '''Template literals.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''location property''' is also cast as a '''city '''and hence displayed here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this, we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* '''Spread Operator'''&lt;br /&gt;
* '''Template Literals'''&lt;br /&gt;
* '''Object '''and&lt;br /&gt;
* '''Array Destructuring'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
* Open the file '''assignment.js''' which you have created earlier.&lt;br /&gt;
* Clear the existing code.&lt;br /&gt;
* '''Declare variable marks'''&lt;br /&gt;
* Assign an '''array '''to''' variable marks '''containing''' 88, 90''' and '''92'''&lt;br /&gt;
* '''Destruct''' the '''array '''and assign the values to '''m1''', '''m2 '''and''' m3''' respectively&lt;br /&gt;
* And '''log''' the values of '''m1, m2''' and '''m3'''&lt;br /&gt;
* Open the file '''MyPage.html''' in a '''web browser'''&lt;br /&gt;
* Observe the output in the '''browser’s console'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by the Ministry of Education (MoE), Government of India.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh and this is Praveen signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C4/Project-Github-Repos/English</id>
		<title>JavaScript/C4/Project-Github-Repos/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C4/Project-Github-Repos/English"/>
				<updated>2021-06-06T15:48:38Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Project: Github Repos&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, github, fetch, repos, event&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and welcome to the spoken tutorial on “'''Project: Github Repos'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will be working on '''Project - GithubRepos '''in''' JS.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
* '''Firefox''' web browser&lt;br /&gt;
&lt;br /&gt;
However, you may use any other browser of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| As a pre-requisites, &lt;br /&gt;
&lt;br /&gt;
* You need '''internet connectivity''' to practice this tutorial.&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the file.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Github Repos&lt;br /&gt;
|| &lt;br /&gt;
* In this '''project''', we need to have a '''textbox '''and '''button '''in the '''UI.'''&lt;br /&gt;
* We need to allow the '''user''' to enter a '''github username''' using the '''textbox'''.&lt;br /&gt;
* On click of a '''button''', we need to make an '''API '''call and display the '''response''' in the '''console'''.&lt;br /&gt;
* NOTE: Proper '''error handling''' must be done using the '''response'''.&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us start working on the '''project'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||[Editor] Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS '''-&amp;gt;''' index.html &amp;amp; main.js'''&lt;br /&gt;
&lt;br /&gt;
|| Then open the files '''index.html''' and '''main.js''' as explained in the earlier tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this demonstration, I have already opened the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These files are available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt; Project – Github Repo &amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;label for = &amp;quot;username&amp;quot; &amp;gt; Username &amp;lt;/label&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;input type = &amp;quot;text&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
name = &amp;quot;username&amp;quot;&lt;br /&gt;
&lt;br /&gt;
id = &amp;quot;username&amp;quot;&lt;br /&gt;
&lt;br /&gt;
placeholder = &amp;quot;Enter Username&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;button id = &amp;quot;getDataButton&amp;quot; &amp;gt; GET REPO DATA &amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;p id = &amp;quot;displayData&amp;quot; &amp;gt; &amp;lt;/p&amp;gt; &amp;lt;script src = &amp;quot;main.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, replace the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||[Editor] Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;label for=&amp;quot;username&amp;quot;&amp;gt;Username&amp;lt;/label&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, I have created a '''label '''for the '''username''' '''textbox'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;input&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
type = &amp;quot;text&amp;quot;&lt;br /&gt;
&lt;br /&gt;
name = &amp;quot;username&amp;quot;&lt;br /&gt;
&lt;br /&gt;
id = &amp;quot;username&amp;quot;&lt;br /&gt;
&lt;br /&gt;
placeholder = &amp;quot;Enter Username&amp;quot; /&amp;gt;&lt;br /&gt;
|| Here, I have created &lt;br /&gt;
&lt;br /&gt;
* a '''username''' '''textbox '''with the '''name '''and '''id '''as '''username'''&lt;br /&gt;
* and the '''placeholder '''as '''Enter username.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;button id = &amp;quot;getDataButton&amp;quot; &amp;gt; GET REPO DATA &amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, I have created a '''button '''with the '''id getDataButton.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;p id=&amp;quot;displayData&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| To display the '''data''', I’m using a '''paragraph tag '''with the '''id '''as '''displayData'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press: Alt + L and Alt + O &lt;br /&gt;
|| Save the file and Start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''Console''' tab&lt;br /&gt;
|| In the web browser, open the '''Browser developer tools''' panel and go to the '''console tab'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;getDataButton&amp;quot;).addEventListener(&amp;quot;click&amp;quot;, getData);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function getData() {&lt;br /&gt;
&lt;br /&gt;
const userName = document.getElementById(&amp;quot;username&amp;quot;).value;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fetch(`http://api.github.com/users/${userName}/repos`)&lt;br /&gt;
&lt;br /&gt;
.then((response) =&amp;gt; response.json())&lt;br /&gt;
&lt;br /&gt;
.then((data) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
console.log(data);&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;displayData&amp;quot;).innerText = JSON.stringify(data);&lt;br /&gt;
&lt;br /&gt;
})&lt;br /&gt;
&lt;br /&gt;
.catch((error) =&amp;gt; console.log(error));&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', type the '''code''' as shown in '''main.js'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;getDataButton&amp;quot;).addEventListener(&amp;quot;click&amp;quot;, getData);&lt;br /&gt;
|| Here, I have added a '''click''' '''event''' '''listener''' for the '''button '''with the '''id getDataButton.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On click, I’m calling the '''getData function '''which is '''declared''' below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Functions '''are '''hoisted''', so there is no problem here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function getData() {&lt;br /&gt;
|| Here, I have '''declared''' a '''function '''with the name '''getData.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const userName = document.getElementById(&amp;quot;username&amp;quot;).value;&lt;br /&gt;
|| Inside the '''function '''I’m taking the value of the '''textbox '''to pass it to the '''URL.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fetch(`http://api.github.com/users/${userName}/repos`)&lt;br /&gt;
|| Here, I’m using the '''Repo’s URL '''to '''pass''' the '''username'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''`'''http://api.github.com/users/${userName}/repos'''`'''&lt;br /&gt;
|| As you can see, I have used '''template literals''' to '''concatenate strings'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.then((response) =&amp;gt; response.json())&lt;br /&gt;
|| You are already aware that the '''response '''contains '''data '''along with '''headers'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To '''return '''only '''data, '''we need to use '''.json()'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.then((data) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
console.log(data);&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;displayData&amp;quot;).innerText = JSON.stringify(data);&lt;br /&gt;
&lt;br /&gt;
})&lt;br /&gt;
|| Here, I get the '''data''' using the '''callback function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(data);&lt;br /&gt;
|| I '''log''' that '''data''' here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;displayData&amp;quot;).innerText&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| To display the '''data''' in the '''paragraph, '''I first access the '''element '''using '''id.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then I assign the '''value '''to '''innerText '''property.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
JSON.stringify(data);&lt;br /&gt;
|| I '''stringify''' the '''data''' and assign it to the '''element'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''JSON.stringify''' is a '''JS inbuilt method''' to convert anything to '''string'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As '''DOM '''can only render '''string, '''I’m converting the '''object '''to '''string'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.catch((error) =&amp;gt; console.log(error));&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| If there are any '''errors,''' I will '''log''' the '''error''' in the '''console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Type '''jayeshkattar'''&lt;br /&gt;
|| I will type '''jayeshkattar '''in the input '''textbox'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Click on GET REPO DATA&lt;br /&gt;
|| Then click on the '''GET REPO DATA''' button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;Array(30) [ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, … ]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
|| We see 30 repositories of the '''user jayeshkattar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is real time '''data. '''You may get a different number when you practice this tutorial. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Window] [Highlight]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[{&amp;quot;id&amp;quot;:55542315,&amp;quot;node_id&amp;quot;:&amp;quot;MDEwOlJlcG9zaXRvcnk1NTU0MjMxNQ==&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
&amp;quot;name&amp;quot;:&amp;quot;adv_project&amp;quot;,&amp;quot;full_name&amp;quot;:&amp;quot;jayeshkattar/adv_project&amp;quot;,&amp;quot;private&amp;quot;:false,&amp;quot;owner&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
{&amp;quot;login&amp;quot;:&amp;quot;jayeshkattar&amp;quot;,&amp;quot;id&amp;quot;:10&amp;lt;/nowiki&amp;gt;550364,&amp;quot;node_id&amp;quot;:&amp;quot;MDQ6VXNlcjEwNTUwMzY0&amp;quot;,&amp;quot;avatar_url&amp;quot; … .. . . .&lt;br /&gt;
&lt;br /&gt;
|| I have displayed the '''data''' in the '''DOM, '''too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this, we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have worked on '''Project - Github Repos'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
&lt;br /&gt;
* If you have a '''github account''', type your '''username''' and check whether you see your '''repository '''details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide:''' '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh and this is Praveen signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C4/Project-Github-Repos/English</id>
		<title>JavaScript/C4/Project-Github-Repos/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C4/Project-Github-Repos/English"/>
				<updated>2021-06-06T15:47:21Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Project: Github Repos&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, github, fetch, repos, event&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and welcome to the spoken tutorial on “'''Project: Github Repos'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will be working on '''Project - GithubRepos '''in''' JS.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
* '''Firefox''' web browser&lt;br /&gt;
&lt;br /&gt;
However, you may use any other browser of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| As a pre-requisites, &lt;br /&gt;
&lt;br /&gt;
* You need '''internet connectivity''' to practice this tutorial.&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the file.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Github Repos&lt;br /&gt;
|| &lt;br /&gt;
* In this '''project''', we need to have a '''textbox '''and '''button '''in the '''UI.'''&lt;br /&gt;
* We need to allow the '''user''' to enter a '''github username''' using the '''textbox'''.&lt;br /&gt;
* On click of a '''button''', we need to make an '''API '''call and display the '''response''' in the '''console'''.&lt;br /&gt;
* NOTE: Proper '''error handling''' must be done using the '''response'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us start working on the '''project'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS '''-&amp;gt;''' index.html &amp;amp; main.js'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Then open the files '''index.html''' and '''main.js''' as explained in the earlier tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this demonstration, I have already opened the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These files are available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt; Project – Github Repo &amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;label for = &amp;quot;username&amp;quot; &amp;gt; Username &amp;lt;/label&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;input type = &amp;quot;text&amp;quot;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
name = &amp;quot;username&amp;quot;&lt;br /&gt;
&lt;br /&gt;
id = &amp;quot;username&amp;quot;&lt;br /&gt;
&lt;br /&gt;
placeholder = &amp;quot;Enter Username&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;button id = &amp;quot;getDataButton&amp;quot; &amp;gt; GET REPO DATA &amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;p id = &amp;quot;displayData&amp;quot; &amp;gt; &amp;lt;/p&amp;gt; &amp;lt;script src = &amp;quot;main.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, replace the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;label for=&amp;quot;username&amp;quot;&amp;gt;Username&amp;lt;/label&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, I have created a '''label '''for the '''username''' '''textbox'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;input&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
type = &amp;quot;text&amp;quot;&lt;br /&gt;
&lt;br /&gt;
name = &amp;quot;username&amp;quot;&lt;br /&gt;
&lt;br /&gt;
id = &amp;quot;username&amp;quot;&lt;br /&gt;
&lt;br /&gt;
placeholder = &amp;quot;Enter Username&amp;quot; /&amp;gt;&lt;br /&gt;
|| Here, I have created &lt;br /&gt;
&lt;br /&gt;
* a '''username''' '''textbox '''with the '''name '''and '''id '''as '''username'''&lt;br /&gt;
* and the '''placeholder '''as '''Enter username.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;button id = &amp;quot;getDataButton&amp;quot; &amp;gt; GET REPO DATA &amp;lt;/button&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, I have created a '''button '''with the '''id getDataButton.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;p id=&amp;quot;displayData&amp;quot;&amp;gt;&amp;lt;/p&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| To display the '''data''', I’m using a '''paragraph tag '''with the '''id '''as '''displayData'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press: Alt + L and Alt + O &lt;br /&gt;
|| Save the file and Start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''Console''' tab&lt;br /&gt;
|| In the web browser, open the '''Browser developer tools''' panel and go to the '''console tab'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;getDataButton&amp;quot;).addEventListener(&amp;quot;click&amp;quot;, getData);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function getData() {&lt;br /&gt;
&lt;br /&gt;
const userName = document.getElementById(&amp;quot;username&amp;quot;).value;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fetch(`http://api.github.com/users/${userName}/repos`)&lt;br /&gt;
&lt;br /&gt;
.then((response) =&amp;gt; response.json())&lt;br /&gt;
&lt;br /&gt;
.then((data) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
console.log(data);&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;displayData&amp;quot;).innerText = JSON.stringify(data);&lt;br /&gt;
&lt;br /&gt;
})&lt;br /&gt;
&lt;br /&gt;
.catch((error) =&amp;gt; console.log(error));&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', type the '''code''' as shown in '''main.js'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;getDataButton&amp;quot;).addEventListener(&amp;quot;click&amp;quot;, getData);&lt;br /&gt;
|| Here, I have added a '''click''' '''event''' '''listener''' for the '''button '''with the '''id getDataButton.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On click, I’m calling the '''getData function '''which is '''declared''' below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Functions '''are '''hoisted''', so there is no problem here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function getData() {&lt;br /&gt;
|| Here, I have '''declared''' a '''function '''with the name '''getData.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const userName = document.getElementById(&amp;quot;username&amp;quot;).value;&lt;br /&gt;
|| Inside the '''function '''I’m taking the value of the '''textbox '''to pass it to the '''URL.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fetch(`http://api.github.com/users/${userName}/repos`)&lt;br /&gt;
|| Here, I’m using the '''Repo’s URL '''to '''pass''' the '''username'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''`'''http://api.github.com/users/${userName}/repos'''`'''&lt;br /&gt;
|| As you can see, I have used '''template literals''' to '''concatenate strings'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.then((response) =&amp;gt; response.json())&lt;br /&gt;
|| You are already aware that the '''response '''contains '''data '''along with '''headers'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To '''return '''only '''data, '''we need to use '''.json()'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.then((data) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
console.log(data);&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;displayData&amp;quot;).innerText = JSON.stringify(data);&lt;br /&gt;
&lt;br /&gt;
})&lt;br /&gt;
|| Here, I get the '''data''' using the '''callback function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(data);&lt;br /&gt;
|| I '''log''' that '''data''' here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;displayData&amp;quot;).innerText&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| To display the '''data''' in the '''paragraph, '''I first access the '''element '''using '''id.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then I assign the '''value '''to '''innerText '''property.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
JSON.stringify(data);&lt;br /&gt;
|| I '''stringify''' the '''data''' and assign it to the '''element'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''JSON.stringify''' is a '''JS inbuilt method''' to convert anything to '''string'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As '''DOM '''can only render '''string, '''I’m converting the '''object '''to '''string'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.catch((error) =&amp;gt; console.log(error));&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| If there are any '''errors,''' I will '''log''' the '''error''' in the '''console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Type '''jayeshkattar'''&lt;br /&gt;
|| I will type '''jayeshkattar '''in the input '''textbox'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Click on GET REPO DATA&lt;br /&gt;
|| Then click on the '''GET REPO DATA''' button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;Array(30) [ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, … ]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
|| We see 30 repositories of the '''user jayeshkattar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is real time '''data. '''You may get a different number when you practice this tutorial. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Window] [Highlight]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[{&amp;quot;id&amp;quot;:55542315,&amp;quot;node_id&amp;quot;:&amp;quot;MDEwOlJlcG9zaXRvcnk1NTU0MjMxNQ==&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
&amp;quot;name&amp;quot;:&amp;quot;adv_project&amp;quot;,&amp;quot;full_name&amp;quot;:&amp;quot;jayeshkattar/adv_project&amp;quot;,&amp;quot;private&amp;quot;:false,&amp;quot;owner&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
{&amp;quot;login&amp;quot;:&amp;quot;jayeshkattar&amp;quot;,&amp;quot;id&amp;quot;:10&amp;lt;/nowiki&amp;gt;550364,&amp;quot;node_id&amp;quot;:&amp;quot;MDQ6VXNlcjEwNTUwMzY0&amp;quot;,&amp;quot;avatar_url&amp;quot; … .. . . .&lt;br /&gt;
&lt;br /&gt;
|| I have displayed the '''data''' in the '''DOM, '''too.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this, we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have worked on '''Project - Github Repos'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
&lt;br /&gt;
* If you have a '''github account''', type your '''username''' and check whether you see your '''repository '''details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide:''' '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh and this is Praveen signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C4/Promise-and-Async-Await-in-JS/English</id>
		<title>JavaScript/C4/Promise-and-Async-Await-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C4/Promise-and-Async-Await-in-JS/English"/>
				<updated>2021-06-06T15:32:19Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Promise and Async-Await&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, Promise, resolve, reject, pending, async, await&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and welcome to the spoken tutorial on “'''Promise''' and '''Async-Await '''in''' JS'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* '''Promise'''&lt;br /&gt;
* '''Chaining in Promises''' and&lt;br /&gt;
* '''Async-Await '''in''' JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the file.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Promise&lt;br /&gt;
|| The '''Promise object '''&lt;br /&gt;
* represents the eventual completion (or failure) of an '''asynchronous operation '''and its resulting value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Promise&lt;br /&gt;
|| A '''Promise '''is always in one of these states:&lt;br /&gt;
* '''pending''': is the initial state, neither fulfilled nor rejected.&lt;br /&gt;
* '''fulfilled''': indicates that the operation was completed successfully. &lt;br /&gt;
** So, .'''then()''' gets '''executed'''&lt;br /&gt;
* '''rejected''': indicates that the operation failed. &lt;br /&gt;
** so, '''.catch()''' gets '''executed'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS '''-&amp;gt;''' index.html &amp;amp; main.js'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Then open the files '''index.html''' and '''main.js''' as explained in the earlier tutorials.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this demonstration, I have already opened the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These files are available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt; Promise and Async-Await &amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src = &amp;quot;main.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, replace the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press: Alt + L and Alt + O &lt;br /&gt;
|| Save the file and start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''Console''' tab&lt;br /&gt;
|| In the '''web browser''', open the '''Browser developer tools''' panel and go to the '''Console tab'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const p = new Promise(function (resolve, reject) {&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve();&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(p);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
console.log(p);&lt;br /&gt;
&lt;br /&gt;
}, 3000);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const p = new Promise&lt;br /&gt;
|| Here, I have '''declared''' a '''Promise '''with '''new Context '''and assigned it to the '''promise variable'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Promise '''is a '''class''' in '''JS.'''&lt;br /&gt;
c&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(function (resolve, reject) {&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve();&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
|| A '''Promise '''accepts a '''callback function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''callback function '''accepts two '''parameters.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
resolve, &lt;br /&gt;
|| The '''parameters '''can be named as per your choice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have defined the first '''parameter''' as '''resolve ''' indicating the '''success state '''of '''promise.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
reject&lt;br /&gt;
|| And, the second '''parameter''' is defined as '''reject ''' indicating the '''failure state '''of '''promise.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
resolve, reject&lt;br /&gt;
|| Both the '''parameters''' are '''callback functions'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can give any '''variable''' names of your choice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, I’m using the standard '''variable names''' - '''resolve '''and '''reject'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve();&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
|| As mentioned, a '''promise '''always '''returns''' a''' state.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We usually make an '''API call''' using '''Promise. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But for now, I’m mocking the '''API call''' using '''setTimeout.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: &amp;lt;/nowiki&amp;gt;resolve();&lt;br /&gt;
|| As discussed, '''resolve''' and '''reject''' are '''callback functions'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here I’m making a '''function call resolve() '''which will '''return''' a '''fulfilled state.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: &amp;lt;/nowiki&amp;gt;2000&lt;br /&gt;
|| You already know that the '''setTimeout function''' accepts a second '''parameter''' in '''milliseconds'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, I’m '''passing 2000'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, the '''callback function''' will be '''executed''' after '''2 seconds'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Promise&lt;br /&gt;
|| As discussed earlier the different '''states''' of a '''promise''' are mentioned here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To verify them, I will be using '''console.log statements.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(p);&lt;br /&gt;
|| I have initially printed the '''p value '''. &lt;br /&gt;
As you know by default the '''promise '''will be in '''pending state.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''p value''' gets '''printed '''in the initial '''program execution'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
console.log(p);&lt;br /&gt;
&lt;br /&gt;
}, 3000);&lt;br /&gt;
|| Here, I’m printing to see the '''state''' of the '''promise '''after '''3 seconds'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because the '''setTimeout function''' executes the '''resolve function '''and '''returns success '''after '''2 seconds.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So to verify the '''fulfilled state''', I’m printing the '''promise '''after '''3 seconds.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show 3 seconds delay.&lt;br /&gt;
&lt;br /&gt;
(While recording)&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;Promise { &amp;lt;state&amp;gt;: &amp;quot;fulfilled&amp;quot;, &amp;lt;value&amp;gt;: undefined }&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
|| If you have noticed here, the '''fulfilled state '''is printed after 3 seconds. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because after '''2 seconds''' the '''setTimeout function returned success.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As I have not '''returned''' anything, the value is seen as '''Undefined'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| So far we have learnt about the basic concept of how '''promise''' works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let's take another example and understand the usage.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function onSuccess() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function onError() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Error!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const promise = new Promise(function (resolve, reject) {&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve();&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
promise.then(onSuccess);&lt;br /&gt;
&lt;br /&gt;
promise.catch(onError); &lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function onSuccess() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Success!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function onError() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Error!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have defined two '''functions onSuccess '''and '''onError.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The first will print ‘'''Success!’''' on execution of '''onSuccess function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The second will print '''‘Error!’ '''on execution of '''onError function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I’ll be using these '''functions '''in the '''promise''' example.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const promise = new Promise(function (resolve, reject) {&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve();&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
|| Here, I have '''declared''' a similar '''promise''', which '''resolves '''after 2 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you are already aware, the '''promise variable''' will hold the '''returned state.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
promise.then(onSuccess);&lt;br /&gt;
|| So, here when the '''state '''is '''fulfilled''', the '''.then method''' gets '''executed.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''.then method''' accepts a '''callback function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, I’m '''passing''' the '''onSuccess function '''as a '''parameter.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''onSuccess function '''gets '''executed''' when the state is '''fulfilled'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
promise.catch(onError); &lt;br /&gt;
|| If the '''state '''is '''rejected''', then the '''.catch method''' gets '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''.catch method''' accepts a '''callback function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, I’m passing '''onError function '''here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''onError function '''will get executed if the '''promise '''is '''rejected'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Success!'''&lt;br /&gt;
|| As the '''promise '''is resolved after 2 seconds, the '''state '''will be '''fulfilled.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As the '''state '''is '''fulfilled''', the '''.then method''' gets '''executed.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''.then method''' has '''onSuccess function '''as a '''callback.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hence the '''onSuccess function '''is '''executed''' and '''Success log''' is displayed here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now let us take another example considering a scenario where we need to execute multiple '''functions.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To achieve this, we need to learn about '''chaining'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function getPromise() {&lt;br /&gt;
&lt;br /&gt;
return new Promise((resolve) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
setTimeout(resolve, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function logA() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;A&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function logB() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;B&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function logCAndThrow() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;C&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
throw new Error();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function catchError() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Error!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
getPromise().then(logA).then(logB).then(logCAndThrow).catch(catchError);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function getPromise() {&lt;br /&gt;
&lt;br /&gt;
return new Promise((resolve) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
setTimeout(resolve, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have '''declared''' a '''function '''which '''returns''' a '''Promise '''on its '''execution.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return new Promise((resolve) =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
setTimeout(resolve, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
|| The '''returned promise '''will resolve after '''2 seconds'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function logA() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;A&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function logB() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;B&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function logCAndThrow() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;C&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
throw new Error();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function catchError() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Error!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have '''declared''' 4 different '''functions''' which just '''print '''on '''execution'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
throw new Error();&lt;br /&gt;
|| In the '''logCAndThrow function''', I have '''thrown '''an error '''explicitly'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As the '''function rejects '''in the middle of '''execution''', so the '''catch method''' gets '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s see this.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: &amp;lt;/nowiki&amp;gt;'''getPromise()'''&lt;br /&gt;
|| Here, I make a '''getPromise function call''' and start '''chaining''' the rest of the '''methods'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: &amp;lt;/nowiki&amp;gt;'''.then(logA)'''&lt;br /&gt;
|| Now I '''chain''' to '''execute''' the '''logA function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: &amp;lt;/nowiki&amp;gt;'''.then(logB)'''&lt;br /&gt;
|| Next I '''chain''' to '''execute''' the '''logB function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''.then(logCAndThrow)'''&lt;br /&gt;
|| After this I '''chain''' to '''execute''' the '''logCAndThrow function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''.catch(catchError);'''&lt;br /&gt;
|| Then I '''execute''' the '''catchError function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let’s see how it works.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''A'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Here, as the '''promise resolves '''to a '''fulfilled state''', '''.then method''' gets '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have '''passed''' the '''logA function '''in the first''' .then() method'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''log A function''' gets '''executed''' and prints''' A.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''B'''&lt;br /&gt;
|| Since the''' logA function''' is '''executed''' without errors, the next''' .then method''' in the chain gets executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have '''passed''' the '''logB function '''in the second '''.then() method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''logB function '''is '''executed''' and '''B''' is printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''C'''&lt;br /&gt;
|| Since the '''logB function '''is executed without errors, the next '''.then method '''in the '''chain''' gets '''executed'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have '''passed''' the '''logCAndThrow function '''in the third '''.then() method'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''logCAndThrow function''' gets '''executed''' and''' C''' is printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
throw new Error();&lt;br /&gt;
|| As discussed earlier, we are explicitly throwing an '''error '''from the '''logCAndThrow function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will get an '''error''', when the '''function '''is '''executed'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Error!'''&lt;br /&gt;
|| We got an error while '''executing''' the '''logCAndThrow function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, the .'''catch method '''gets '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have '''passed '''the''' catchError function''' in the '''.catch method.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, the '''catchError function '''is executed and '''Error! '''is printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| The advantages of '''chaining''' are&lt;br /&gt;
&lt;br /&gt;
* the code would be more modular and readable and &lt;br /&gt;
* can have one proper '''error handling mechanism'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
getPromise()'''.then(logA).then(logB).then(logCAndThrow).'''catch(catchError);&lt;br /&gt;
|| Here, we have '''chained multiple function calls'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While '''executing''' this, we could encounter some error at '''run-time'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If so, the further '''.then''' '''execution''' will be stopped and '''.catch method''' will get '''executed'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now let’s learn about '''async-await.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Async - Await&lt;br /&gt;
|| &lt;br /&gt;
* '''async keyword '''- instructs the '''interpreter '''that there’s an '''asynchronous call''' happening inside the '''function'''.&lt;br /&gt;
* '''async function '''always '''returns''' a '''Promise'''&lt;br /&gt;
* '''await keyword '''&lt;br /&gt;
** tells the '''interpreter '''to wait for the '''function '''to '''return.'''&lt;br /&gt;
** Only after that the next instruction will be '''executed'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
async function display() {&lt;br /&gt;
&lt;br /&gt;
return 1;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(display());&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display()&lt;br /&gt;
&lt;br /&gt;
.then(() =&amp;gt; console.log(&amp;quot;Promise is resolved!&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
.catch(() =&amp;gt; console.log(&amp;quot;Promise is rejected!&amp;quot;));&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
async function display() {&lt;br /&gt;
&lt;br /&gt;
return 1;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| First, let's understand the basics of '''async function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, I have '''declared''' a '''function''' '''display'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
async function&lt;br /&gt;
|| I’m using the '''async keyword '''besides the '''function keyword.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This tells the '''interpreter''' to consider this as an '''asynchronous function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return 1;&lt;br /&gt;
|| Here, the '''function returns 1 ''' which is the value being '''returned'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The value is '''returned''' along with the '''state'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(display());&lt;br /&gt;
|| To verify the '''state '''and value, I have '''logged''' the '''function '''inside the '''console statement'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display()&lt;br /&gt;
&lt;br /&gt;
.then(() =&amp;gt; console.log(&amp;quot;Promise is resolved!&amp;quot;))&lt;br /&gt;
&lt;br /&gt;
.catch(() =&amp;gt; console.log(&amp;quot;Promise is rejected!&amp;quot;));&lt;br /&gt;
|| Here, to verify the '''promise state, '''I have used '''.then''' and '''.catch methods.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
.then(() =&amp;gt; console.log(&amp;quot;Promise is resolved!&amp;quot;))&lt;br /&gt;
|| Here, in '''.then''' I have '''logged''' a message in the '''callback function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
catch(() =&amp;gt; console.log(&amp;quot;Promise is rejected!&amp;quot;));&lt;br /&gt;
|| Similarly in '''.catch''' I have '''logged''' a message in the '''callback function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;Promise { &amp;lt;state&amp;gt;: &amp;quot;fulfilled&amp;quot;, &amp;lt;value&amp;gt;: 1 }&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
|| If you see here, the '''state '''is '''fulfilled '''and the''' value''' is '''1.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''value 1''' is displayed here as the '''value returned''' from the '''function '''is '''1.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Promise is resolved!'''&lt;br /&gt;
|| As the''' promise '''is in the '''fulfilled '''state, '''.then method''' gets '''executed.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It prints the message inside the''' .then callback function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have only learnt about the '''async keyword''' so far. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let’s learn about the '''await keyword'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const getData = () =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
new Promise(function (resolve, reject) {&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve(&amp;quot;My Data&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
async function display() {&lt;br /&gt;
&lt;br /&gt;
const userData = await getData();&lt;br /&gt;
&lt;br /&gt;
console.log(userData);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display();&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const getData = () =&amp;gt;&lt;br /&gt;
&lt;br /&gt;
new Promise(function (resolve, reject) {&lt;br /&gt;
&lt;br /&gt;
setTimeout(() =&amp;gt; {&lt;br /&gt;
&lt;br /&gt;
resolve(&amp;quot;My Data&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}, 2000);&lt;br /&gt;
&lt;br /&gt;
});&lt;br /&gt;
|| Here, I have '''declared''' a '''promise''', which '''resolves''' after 2 seconds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''resolved promise '''will '''return My Data string''' as the value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
async function display() {&lt;br /&gt;
&lt;br /&gt;
const userData = await getData();&lt;br /&gt;
&lt;br /&gt;
console.log(userData);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have '''declared''' an '''async display function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have mentioned the '''async keyword '''beside '''function declaration.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, it instructs the '''interpreter''' telling that inside this '''function '''some '''asynchronous calls''' are made.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const userData = await getData();&lt;br /&gt;
|| Here, '''await keyword '''is used before the '''getData function call.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is to tell the '''interpreter''' to wait until the '''getData function returns''' something.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The next instruction will be '''interpreted''' only after the '''getData function''' completes '''execution'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(userData);&lt;br /&gt;
|| The '''returned data''' is stored in the '''userData variable '''to verify I’m '''logging''' the '''variable'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
display();&lt;br /&gt;
|| Here, I make a '''display function call''' to execute the '''display function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show 2 seconds delay in '''console.'''&lt;br /&gt;
&lt;br /&gt;
(While recording)&lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
'''My Data'''&lt;br /&gt;
|| If you have noticed the '''delay''', initially the '''console '''was empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then after 2 seconds, we see '''My Data '''displayed in the '''console'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''interpreter''' waited for the '''getData function '''to '''return''' something.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only then it '''executes''' further instruction.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* '''Promise'''&lt;br /&gt;
* '''Chaining in Promises''' and&lt;br /&gt;
* '''Async-Await '''in '''JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
* Open the file '''assignment.js''' which you have created earlier.&lt;br /&gt;
* Clear the existing code.&lt;br /&gt;
* Create a '''promise p'''&lt;br /&gt;
* And resolve the '''promise '''after 2 seconds&lt;br /&gt;
* '''Log ‘Promise is resolved'''!’ after the '''promise resolves'''.&lt;br /&gt;
* Else, '''log Error! '''&lt;br /&gt;
* Open the file '''MyPage.html''' in a '''web browser'''.&lt;br /&gt;
* Observe the output in the '''browser’s console'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide:  Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh and this is Praveen signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C2/Common-Edit-and-Print-Functions/English</id>
		<title>LibreOffice-Suite-Draw-6.3/C2/Common-Edit-and-Print-Functions/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C2/Common-Edit-and-Print-Functions/English"/>
				<updated>2021-03-30T19:11:20Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{| border=1&lt;br /&gt;
|| '''Visual Cue'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''':''' Title Slide'''&lt;br /&gt;
|| Welcome to the '''spoken tutorial''' on '''Common Edit and Print Functions '''in '''LibreOffice Draw'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Learning Objective'''s&lt;br /&gt;
|| In this tutorial, we will learn to: &lt;br /&gt;
&lt;br /&gt;
* Set''' margins '''for the '''Draw page '''&lt;br /&gt;
* Insert''' '''page numbers, date and time &lt;br /&gt;
* Use '''Undo '''and '''Redo '''actions &lt;br /&gt;
* Rename a '''page''' &lt;br /&gt;
* Print a '''page'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''System Requirements'''&lt;br /&gt;
|| This tutorial is recorded using,&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux OS''' version 18.04 and &lt;br /&gt;
* '''LibreOffice Suite''' version 6.3.5&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to '''Water-Cycle.odg'''&lt;br /&gt;
|| Let’s open our '''Water hyphen Cycle dot odg''' file which we created earlier in this series.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Code Files'''&lt;br /&gt;
||&lt;br /&gt;
* The files used in this tutorial have been provided to you in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Please download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Important Note'''&lt;br /&gt;
||&lt;br /&gt;
* As we work on this file, remember to press '''Ctrl + S''' to save the file frequently.&lt;br /&gt;
* Also remember to click anywhere on the page to deselect a shape after drawing it.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Point towards Page Margins&lt;br /&gt;
|| Now, we will set '''Page Margins''' for this drawing.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Page Margins'''&lt;br /&gt;
|| Why are '''Page Margins''' necessary?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''Page Margins''' determine the space within which the '''objects '''will be placed inside a '''page'''.&lt;br /&gt;
* This is mainly to print the drawing.&lt;br /&gt;
* With '''margins '''we can ensure that there is adequate space on the sides.&lt;br /&gt;
* It prevents any part of the diagram from being cut when we print it. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Let us '''set '''the '''Page Margins''' and then print the '''WaterCycle ''' diagram.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let’s say the '''paper size''' that we want to use to print this diagram, is a customised size.&lt;br /&gt;
|- &lt;br /&gt;
|| Point towards '''page margins '''on the top and left side&lt;br /&gt;
|| It has a '''Width '''and '''Height''' of '''20 by 20 centimeters.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It also requires a bottom''' margin''' of''' 1.5 centimeters.'''&lt;br /&gt;
|- &lt;br /&gt;
|| From the '''Main menu''' &amp;gt;&amp;gt; select '''Page'''&amp;gt;&amp;gt; click '''Properties'''&lt;br /&gt;
|| To '''set''' these measurements, from the '''Main menu''' select '''Page '''and click on '''Properties'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point towards the '''Page Setup '''dialog box &lt;br /&gt;
|| The '''Page Setup dialog box''' appears.&lt;br /&gt;
|- &lt;br /&gt;
|| Point towards the '''Page tab'''&lt;br /&gt;
|| Click on the '''Page '''tab if not already selected.&lt;br /&gt;
|- &lt;br /&gt;
|| Enter Width = '''20''', Height ='''20''', &lt;br /&gt;
&lt;br /&gt;
Bottom = '''1.5'''&lt;br /&gt;
|| Under''' Paper Format''', in the '''Width''' and '''Height''' fields, type the value “'''20cm'''” each.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under '''Margins''', in the '''Bottom '''field, type '''1.5 centimeters.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''preview '''of the page displayed on the right side.&lt;br /&gt;
|| To the right, we can see a '''preview '''of the '''Draw page'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This '''preview ''' displays the changes made to the '''Draw page'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''OK.'''&lt;br /&gt;
|| Click on the '''OK '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''Draw '''page.&lt;br /&gt;
|| How does the '''page''' look now?&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Point to the margins and the '''spill-over.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point towards the '''spill-over'''&lt;br /&gt;
||The drawing appears to spill out of the '''page'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This means that a part of the diagram will be cut when it is printed.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''page margins'''.&lt;br /&gt;
|| We need to ensure that the diagram is always within the '''margins '''before printing.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| It is a good practice to '''set ''' the correct '''page margins''' before we begin our drawing.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| If we missed to do so in the beginning, we can '''set''' the correct '''margins ''' now before printing.&lt;br /&gt;
|- &lt;br /&gt;
|| From the '''Main menu,''' select '''Format '''and click '''Page'''.&lt;br /&gt;
|| From the '''Main menu''', select '''Page '''and click on '''Properties'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the Page Setup dialog box.&lt;br /&gt;
|| The''' Page Setup dialog box''' appears.&lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''Format '''drop-down list and select '''A4'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select '''Orientation''' &amp;gt;&amp;gt; '''Landscape'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Margins''' &amp;gt;&amp;gt; '''Bottom = 1.0'''&lt;br /&gt;
|| In the '''Page tab,''' under '''Paper Format,''' click on the '''Format '''drop down list and select '''A4'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under '''Orientation, '''click on the '''Landscape '''radio button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under '''Margins''', in the '''Bottom '''field, type '''1.0 centimeter.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click''' OK.'''&lt;br /&gt;
|| Then click on the '''OK '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Point towards the '''margins'''&lt;br /&gt;
|| The drawing is now placed correctly within the '''margins'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click to view the '''context menu''' &amp;gt;&amp;gt; click on '''Properties'''&lt;br /&gt;
|| We can also access the '''Page setup dialog box''' in another way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click on the '''page'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the '''context menu,''' click on '''Properties.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Cancel'''.&lt;br /&gt;
|| Let’s click '''Cancel '''and '''exit '''the '''dialog box'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + S '''&lt;br /&gt;
&lt;br /&gt;
|| Press '''Ctrl + S ''' to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Now, let us insert '''page''' numbers, date, time and the author’s name.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the page with the '''WaterCycle '''diagram.&lt;br /&gt;
|| So, select the '''page''' with the '''WaterCycle '''diagram first. &lt;br /&gt;
|- &lt;br /&gt;
|| Go to the '''Main menu '''&amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
click '''Insert '''&amp;gt;&amp;gt; click '''Field'''&lt;br /&gt;
|| Go to the '''Main menu''', select '''Insert ''' and click on '''Field.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point towards list of '''Fields'''&lt;br /&gt;
|| A list of '''Fields '''is displayed.&lt;br /&gt;
|- &lt;br /&gt;
|| Move the cursor up and down the list to show the various options.&lt;br /&gt;
|| '''Fields '''contain values that are automatically generated by '''Draw'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| We simply have to insert a '''Field '''and the value generated by '''Draw'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Page number.'''&lt;br /&gt;
|| Let us click on '''Page number'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Come to the '''Draw '''page and point to the box&lt;br /&gt;
|| A '''text box''' with the number '''1 '''is inserted on the '''Draw page'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Adjust the size of the''' text box''' so that it is small and only the '''number '''one is visible.&lt;br /&gt;
|| Let’s adjust the size of this '''text box ''' and make it a little smaller.&lt;br /&gt;
|- &lt;br /&gt;
|| Drag the box and place it at the bottom right corner of the page.&lt;br /&gt;
|| Now, drag the '''box''' and place it at the bottom right corner of the '''page'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select page two.&lt;br /&gt;
|| Let’s check if the next number has been inserted on '''page''' two of this '''Draw ''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| Point that the number is not inserted there.&lt;br /&gt;
|| No, it does not show the '''page''' number!&lt;br /&gt;
|- &lt;br /&gt;
|| Select page '''one'''.&lt;br /&gt;
|| In '''Draw''', the '''page '''number is inserted only in the '''page''' where we insert the '''field'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
&lt;br /&gt;
Return to page 1&lt;br /&gt;
|| Now let’s learn how to change the '''page''' number '''format'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Return to '''page '''1.&lt;br /&gt;
|- &lt;br /&gt;
|| Return to page 1 &amp;gt;&amp;gt; Go to '''Main Menu''' &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
select '''Page'''&amp;gt;&amp;gt; click '''Properties'''&lt;br /&gt;
|| Now, right-click on the '''page '''.&lt;br /&gt;
&lt;br /&gt;
And in the''' Context menu''' click on '''Properties.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Page Setup''' dialog box appears.&lt;br /&gt;
|| The '''Page Setup '''dialog box appears.&lt;br /&gt;
|- &lt;br /&gt;
|| Under '''Layout settings''' click drop down against '''Page numbers'''&lt;br /&gt;
|| In the '''Page tab''', under '''Layout settings''', click on the drop down against '''Page numbers.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Select option '''a,b,c. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click '''OK'''.&lt;br /&gt;
|| From the drop-down list select ''' a,b,c.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Show the change in page numbers&lt;br /&gt;
|| The '''page '''numbering has changed from '''1, 2, 3''' to '''a, b, c.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Likewise, we can change it to any '''format ''' as per our requirements.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + S'''&lt;br /&gt;
|| Press '''Ctrl + S''' to save the file&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Next, let’s learn how to insert date and time '''fields'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to the '''Main menu''' &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
click '''Insert '''&amp;gt;&amp;gt; select '''Field'''&lt;br /&gt;
|| To do so, again go to the '''Main menu bar,''' select '''Insert '''and click on '''Field.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Move the cursor to point the '''Date (fixed) '''and '''Date (variable)'''&lt;br /&gt;
|| In the list of options we can see '''Date (fixed)''' and '''Date (variable).'''&lt;br /&gt;
|- &lt;br /&gt;
|| Then move the cursor over '''Time (fixed) '''and '''Time (variable) '''options.&lt;br /&gt;
|| We can also see '''Time (fixed) '''and '''Time (variable).'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Date (fixed) '''and '''Time (fixed)''' options.&lt;br /&gt;
|| The''' Date (fixed) '''and '''Time (fixed) '''options insert the current date and time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These date and time values will not be updated.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Date (variable) '''and '''Time (variable)''' options.&lt;br /&gt;
|| '''Date (variable) '''and '''Time (variable)''' automatically get updated as and when we update the file. &lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Time (variable).'''&lt;br /&gt;
|| Let’s insert the '''Time (variable''') here.&lt;br /&gt;
|- &lt;br /&gt;
|| Drag the box &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
place it above the '''page number '''at the '''bottom '''right corner of the '''page'''.&lt;br /&gt;
|| Now, drag the '''box''' and place it above the '''page '''number at the bottom right corner of the '''page'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the time text box.&lt;br /&gt;
|| The time inserted will be updated to the current time whenever we open this '''Draw''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us now enter the author’s name who has created this file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We shall '''set '''the author’s name on '''page''' one as “'''Teacher A'''”.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to the '''Main menu''' &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
click '''Tools '''&amp;gt;&amp;gt; click '''Options '''&amp;gt;&amp;gt;&lt;br /&gt;
|| On '''page''' one, go to the''' Main menu''', select '''Tools '''and click on '''Options'''.&lt;br /&gt;
|- &lt;br /&gt;
|| The '''Options ''' dialog box appears&lt;br /&gt;
|| The '''Options  dialog box''' appears. &lt;br /&gt;
|- &lt;br /&gt;
|| Point on '''LibreOffice''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point on''' User Data.'''&lt;br /&gt;
|| In the '''Options dialog box''', on the left side locate '''LibreOffice.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that '''User Data '''is already selected.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the right side of the dialog box where the '''data fields '''are displayed.&lt;br /&gt;
|| On the right side of the '''dialog box''', we can type any other '''user data''' information. &lt;br /&gt;
|- &lt;br /&gt;
|| Point to the fields Company, Street, and Title/Position.&lt;br /&gt;
|| We can type any detail here as per our requirement.&lt;br /&gt;
|- &lt;br /&gt;
|| In the '''First/Last Name/Initials,''' enter the text “'''Teacher”, “A'''”&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point towards the updated '''field'''&lt;br /&gt;
|| In the '''First '''and '''Last Name '''fields, let’s type the text '''Teacher '''and''' A''', respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Initials field '''gets updated automatically.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''OK'''.&lt;br /&gt;
|| Click on the '''OK ''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to '''Main menu '''&amp;gt;&amp;gt; select '''Insert '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click '''Field '''&amp;gt;&amp;gt; Select '''Author'''.&lt;br /&gt;
|| Now, from the '''Main menu,''' click on '''Insert.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on '''Field ''' and select '''Author'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the Name''' Teacher A'''&lt;br /&gt;
|| The text '''Teacher A''' is inserted in a '''text box'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Move and place this just above the '''Time '''field at the '''bottom '''right corner of the '''Draw '''page.&lt;br /&gt;
|| Let’s drag this '''box'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And place it just above the '''Time ''' field at the bottom right corner of the '''Draw page'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, what if we want to remove the fields we inserted in the '''Draw page'''?&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Delete '''button on the keyboard&lt;br /&gt;
|| Simply select the '''text box '''and press the '''Delete '''key.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the field '''Author Name''' and delete it.&lt;br /&gt;
|| Let’s delete the field '''Author Name'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| And what if we want to undo this action?&lt;br /&gt;
|- &lt;br /&gt;
|| Text on screen: Press '''CTRL '''and '''Z '''keys together&lt;br /&gt;
|| We can undo any action by pressing''' CTRL''' and '''Z '''keys together.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to show that the field is visible.&lt;br /&gt;
|| The action that was last executed, that is the deletion of the '''Author field''', is undone.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''field''' is visible again!&lt;br /&gt;
|- &lt;br /&gt;
|| Point to main menu&lt;br /&gt;
|| We can undo or redo actions from the '''Main menu''' too.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the Redo icon on the Standard toolbar&lt;br /&gt;
|| Click on the '''Redo''' icon on the '''Standard toolbar'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to show that the field is no longer visible.&lt;br /&gt;
|| The '''Author’s '''name''' '''is no longer visible!&lt;br /&gt;
|- &lt;br /&gt;
|| Undo the other actions until the field insertions are also undone.&lt;br /&gt;
|| Let’s press the '''CTRL+Z''' keys and undo all the field insertions we made.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Shortcut Keys'''&lt;br /&gt;
|| We can also use '''shortcut '''keys from the '''keyboard '''for the '''undo''' and '''redo commands'''.&lt;br /&gt;
&lt;br /&gt;
* Press the''' CTRL''' + '''Z '''keys together to undo an action.&lt;br /&gt;
* Press the '''CTRL '''+ '''Y '''keys together to redo an action.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + S'''&lt;br /&gt;
|| Press '''Ctrl + S''' to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the page with the '''WaterCycle '''diagram.&lt;br /&gt;
|| Let’s now name '''page''' one as “'''WaterCycleSlide'''”.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to the '''Pages pane''' &amp;gt;&amp;gt; '''Rename Page'''&lt;br /&gt;
|| Select the slide in the '''Pages pane, '''right-click and select '''Rename Page'''.&lt;br /&gt;
|- &lt;br /&gt;
|| The '''Rename slide''' dialog box appears.&lt;br /&gt;
|| The '''Rename Slide dialog box''' appears.&lt;br /&gt;
|- &lt;br /&gt;
|| In the '''Name '''field, type the name “'''WaterCycleSlide'''” &amp;gt;&amp;gt; Click '''OK'''.&lt;br /&gt;
|| In the '''Name '''field, type the name '''WaterCycleSlide '''and click on the '''OK '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Move the cursor just over the '''page '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the '''Pages pane''' and wait till the name “'''WaterCycleSlide'''” appears.&lt;br /&gt;
|| Now, let’s place the '''cursor''' over this '''page'''.&lt;br /&gt;
&lt;br /&gt;
Can you see the name “'''WaterCycleSlide'''” displayed here?&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| It is a good practice to assign a name that is relevant to the '''page'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + S'''&lt;br /&gt;
|| Press '''Ctrl + S''' to save the file&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Next, let’s learn to '''set '''the '''printing''' options and print the '''WaterCycle '''diagram.&lt;br /&gt;
|- &lt;br /&gt;
|| In the '''Main menu''' &amp;gt;&amp;gt; click '''Print'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point towards Print dialog box&lt;br /&gt;
|| In the '''Main menu''', click '''File ''' then select '''Print'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Print dialog box''' appears.&lt;br /&gt;
|- &lt;br /&gt;
|| Point towards '''Print icon '''on '''Standard toolbar'''&lt;br /&gt;
|| We can also access the '''Print  dialog box''' by clicking on the''' Print icon''' on the '''Standard Toolbar'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the right hand side of the '''Print '''dialog box &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Point towards '''General '''and '''LibreOffice Draw''' Options&lt;br /&gt;
|| The right side of the “'''Print” dialog box''' shows 2''' tabs:'''&lt;br /&gt;
&lt;br /&gt;
'''General '''and '''LibreOffice Draw.'''&lt;br /&gt;
|-&lt;br /&gt;
||Point to the options in the '''General''' tab.&lt;br /&gt;
||The '''settings''' under '''General''' tab are similar to the '''LibreOffice Writer settings'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Move the cursor to the left side &amp;gt;&amp;gt; point to the print '''preview '''area.&lt;br /&gt;
|| On the left side, we can see the '''print preview '''area. &lt;br /&gt;
|- &lt;br /&gt;
|| Point to LibreOffice Draw tab.&lt;br /&gt;
|| Let’s look at the options specific to''' LibreOffice Draw'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click the '''LibreOffice Draw t'''ab.&lt;br /&gt;
|| Click on the''' LibreOffice Draw''' tab. &lt;br /&gt;
|- &lt;br /&gt;
|| Check the boxes '''Page name, Date '''and '''Time.'''&lt;br /&gt;
|| Under '''Contents''', let’s check the boxes ‘'''Page name’''' and ‘'''Date and Time’'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will print the''' page''' name, date and time on the drawing.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''Original colors'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select''' Fit to printable page'''.&lt;br /&gt;
|| Under '''Color, '''let us select '''Original colors.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Under '''Size, '''select '''Fit to printable page.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Just point to the '''Print '''button.&lt;br /&gt;
&lt;br /&gt;
Do not click it.&lt;br /&gt;
|| Click on the '''OK '''button to print the '''WaterCycle '''drawing from your computer.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| If you have configured your '''printer''' correctly, then your drawing should begin printing now.&lt;br /&gt;
|- &lt;br /&gt;
|| Press Ctrl + S to save the file&lt;br /&gt;
|| Let us save all the changes made and close the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| This brings us to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Let us summarise.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Summary'''&lt;br /&gt;
|| In this tutorial, we have learnt to: &lt;br /&gt;
&lt;br /&gt;
* '''Set margins '''for the '''Draw page '''&lt;br /&gt;
* Insert''' page''' numbers, date and time &lt;br /&gt;
* Use '''Undo ''' and '''Redo '''actions &lt;br /&gt;
* Rename a '''page''' &lt;br /&gt;
* Print a '''page'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Assignment'''&lt;br /&gt;
|| Here is an assignment for you.&lt;br /&gt;
&lt;br /&gt;
* Open '''MyPractice.odg''' file. &lt;br /&gt;
* Select the invitation slide that you have created. &lt;br /&gt;
* Note the slide number in the '''Pages pane'''.  &lt;br /&gt;
* Print this slide by selecting '''Pages''' option under '''Range and Copies'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''About Spoken Tutorial Project'''&lt;br /&gt;
||&lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Spoken tutorial workshops'''&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using Spoken Tutorials and give certificates.&lt;br /&gt;
* For more details, please contact us.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Forums'''&lt;br /&gt;
|| Please post your timed queries in this forum.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Acknowledgement'''&lt;br /&gt;
|| Spoken Tutorial project is funded by Ministry of Education (MoE), Govt. of India&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Thank you'''&lt;br /&gt;
|| This tutorial was originally contributed by DesiCrew Solutions Pvt. Ltd. in 2011&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The script for this tutorial was written by Nikita Misal from IIT Bombay.&lt;br /&gt;
&lt;br /&gt;
And this is Madhuri Ganapathi along with the Spoken Tutorial team signing off. &lt;br /&gt;
&lt;br /&gt;
Thank you for watching.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C2/Working-with-Objects/English</id>
		<title>LibreOffice-Suite-Draw-6.3/C2/Working-with-Objects/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C2/Working-with-Objects/English"/>
				<updated>2021-03-30T18:20:33Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|border=1&lt;br /&gt;
||'''Visual Cue'''&lt;br /&gt;
||'''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Title Slide'''&lt;br /&gt;
|| Welcome to the''' spoken tutorial '''on '''Working with Objects.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''':''' Learning Objectives'''&lt;br /&gt;
|| In this tutorial, you will learn how to:&lt;br /&gt;
* Cut, copy, and paste''' objects'''&lt;br /&gt;
* Resize''' objects''' dynamically using '''handles'''&lt;br /&gt;
* Arrange '''objects'''&lt;br /&gt;
* Group and ungroup''' objects'''&lt;br /&gt;
* Edit''' '''individual '''objects''' in a '''group '''and&lt;br /&gt;
* Move''' objects''' within a '''group'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''System Requirements '''&lt;br /&gt;
|| This tutorial is recorded using &lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux '''OS version 18.04 and &lt;br /&gt;
* '''LibreOffice Suite''' version 6.3.5&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to '''Water-Cycle'''.odg&lt;br /&gt;
|| Let’s open our '''Water'''-'''Cycle'''.'''odg''' file which we created earlier in this series.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Code files'''&lt;br /&gt;
||&lt;br /&gt;
* This file has been provided to you in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Please download and extract the file.&lt;br /&gt;
* Make a copy and then use it for practising.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the draw page.&lt;br /&gt;
|| Now, let’s copy and paste''' '''three more clouds.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''cloud ''' &amp;gt;&amp;gt; Right-click to view the '''context menu''' &amp;gt;&amp;gt; Click '''Copy'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Place the '''cursor '''next to the cloud &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Right-click for the '''context menu''' &amp;gt;&amp;gt; Click '''Paste'''.&lt;br /&gt;
|| First select the cloud in the page and right-click to view the '''context menu.'''&lt;br /&gt;
&lt;br /&gt;
Select the option '''Copy'''.&lt;br /&gt;
&lt;br /&gt;
Then, place the '''cursor '''anywhere on the page.&lt;br /&gt;
&lt;br /&gt;
Right-click for the '''context menu''' and select '''Paste'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''cloud'''&lt;br /&gt;
|| But we can see only one cloud!&lt;br /&gt;
&lt;br /&gt;
Where is the cloud which we copied and pasted? &lt;br /&gt;
&lt;br /&gt;
The copied cloud has been pasted on top''' '''of the original cloud!&lt;br /&gt;
|- &lt;br /&gt;
|| '''Move '''the '''cloud '''to the left&lt;br /&gt;
|| Let us select the cloud''' '''and move''' '''it to the left.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we can see both the clouds.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us create one more cloud''' '''in the same manner.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the second '''cloud ''' &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Right-click to view the '''context menu''' &amp;gt;&amp;gt; Click '''Copy '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click for the '''context menu''' &amp;gt;&amp;gt; Click '''Paste'''.&lt;br /&gt;
|| Select the cloud.&lt;br /&gt;
&lt;br /&gt;
Right-click and select '''Copy.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Again right-click select '''Paste'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select and move the '''copied cloud '''to the left.&lt;br /&gt;
|| Now, select the copied cloud and move it to the left.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Shortcut Keys'''&lt;br /&gt;
|| We can also use shortcut keys to make copies of '''objects'''.&lt;br /&gt;
&lt;br /&gt;
* '''CTRL + C''' to copy an '''object'''&lt;br /&gt;
* '''CTRL + V''' to paste an '''object'''&lt;br /&gt;
* '''CTRL + X''' to cut an '''object'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to the '''Draw '''file.&lt;br /&gt;
&lt;br /&gt;
Select the third cloud you copied&lt;br /&gt;
&lt;br /&gt;
Press the '''CTRL + C''' keys together&lt;br /&gt;
|| Switch back to the '''Draw '''file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the cloud and press '''CTRL '''and '''C''' keys together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The cloud has been copied.&lt;br /&gt;
|- &lt;br /&gt;
||Press '''CTRL+ V''' keys together &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the '''cloud '''and move it to the left.&lt;br /&gt;
|| To paste, press '''CTRL '''and '''V '''keys together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now select the cloud''' '''and move it to the desired location.&lt;br /&gt;
|- &lt;br /&gt;
|| Press''' CTRL+ S '''keys&lt;br /&gt;
|| Press''' CTRL''' and '''S '''keys to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Text on screen: Set the '''Automatic Save''' option&lt;br /&gt;
|| To avoid accidental loss of work, set the '''Automatic Save''' option. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That way your changes are saved automatically.&lt;br /&gt;
|- &lt;br /&gt;
 &lt;br /&gt;
|| Select the first '''arrow '''on the left side of the '''page '''&lt;br /&gt;
&lt;br /&gt;
Place the '''cursor '''on the bottom '''handle '''&lt;br /&gt;
|| Now, let’s see how to resize the arrow '''object'''.&lt;br /&gt;
&lt;br /&gt;
First select the arrow '''object''' and move the '''cursor '''very slowly over one of the '''handles'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Wait for the small '''arrow '''to appear.&lt;br /&gt;
|| A small transparent arrow with a square beneath appears at the '''cursor '''tip.&lt;br /&gt;
|- &lt;br /&gt;
|| Press the '''Shift key'''&lt;br /&gt;
&lt;br /&gt;
Click the left '''mouse '''button.&lt;br /&gt;
&lt;br /&gt;
Pull the '''arrow '''a little down.&lt;br /&gt;
|| Now, press the '''Shift '''key on the '''keyboard'''.&lt;br /&gt;
&lt;br /&gt;
Click the left '''mouse '''button.&lt;br /&gt;
&lt;br /&gt;
Using the arrow’s''' handle, '''drag it down and release the '''mouse '''button and the '''Shift '''key.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + Z'''&lt;br /&gt;
|| It is much easier to resize line and arrow '''objects''' if you press the '''Shift key'''.&lt;br /&gt;
&lt;br /&gt;
If we don’t then the line and arrow will not be straight.&lt;br /&gt;
&lt;br /&gt;
Let us undo all these changes we made for the arrow.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Dynamic Resizing'''&lt;br /&gt;
||&lt;br /&gt;
* Resizing''' '''using the '''handles '''of an '''object '''is called '''Dynamic Resizing'''&lt;br /&gt;
* This means we do not use exact measurements.&lt;br /&gt;
&lt;br /&gt;
We will learn to exactly resize '''objects''' in later tutorials.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the rectangle&lt;br /&gt;
&lt;br /&gt;
Select the '''rectangle''' &amp;gt;&amp;gt; Place the '''cursor '''on the right '''handle '''&lt;br /&gt;
&lt;br /&gt;
Press the '''Shift key''' and drag it upward&lt;br /&gt;
|| Next, let’s increase the width of this rectangle '''object'''.&lt;br /&gt;
&lt;br /&gt;
Select the '''rectangle''', grab one of the corner '''handles''' by clicking the left '''mouse '''button. &lt;br /&gt;
&lt;br /&gt;
Press the '''Shift key''' on the keyboard and drag it upward.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the right of the '''Status bar '''.&lt;br /&gt;
&lt;br /&gt;
Select the '''rectangle '''&amp;gt;&amp;gt; Hold the '''Shift key'''&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; select the middle-left '''handle '''and enlarge it &amp;gt;&amp;gt; Point to right of the '''Status bar'''&lt;br /&gt;
|| Look at the '''Status bar''', at the bottom of the '''Draw '''window.&lt;br /&gt;
&lt;br /&gt;
Note that when we resize the rectangle''' '''again, the '''dimensions '''change.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''object information '''area and then the '''position '''and the '''dimension'''.&lt;br /&gt;
|| The '''Status bar''' shows the change in '''position '''and '''dimension '''of the '''object''' at the bottom.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Sample Drawing'''&lt;br /&gt;
|| Now let’s arrange the clouds and the sun as shown here.&lt;br /&gt;
|- &lt;br /&gt;
|| Press''' CTRL+S '''keys&lt;br /&gt;
|| Press''' CTRL+S '''keys to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the clouds.&lt;br /&gt;
|| To identify the clouds, let’s number them 1, 2, 3, 4, starting from left to right.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the first cloud to the left &lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; Double-click &amp;gt;&amp;gt; Type 1.&lt;br /&gt;
|| To insert the numbers, let’s select the first cloud, double-click''' '''and type 1.&lt;br /&gt;
|- &lt;br /&gt;
|| Just show the end result, no need to demonstrate&lt;br /&gt;
|| Similarly, number the other clouds''' '''too.&lt;br /&gt;
|- &lt;br /&gt;
|| point to the icons.&lt;br /&gt;
|| If you have resized your '''LibreOffice''' window, some of the icons may not be visible.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on Double arrow '''&amp;gt;&amp;gt;''' &lt;br /&gt;
&lt;br /&gt;
icon at the end of the '''toolbars'''&lt;br /&gt;
|| In that case, click on the '''double arrow''' icon at the end of the '''toolbar''' to see the hidden icons.&lt;br /&gt;
|- &lt;br /&gt;
|| Select cloud 4 &amp;gt;&amp;gt; drag and drop it above the sun &lt;br /&gt;
|| Now, let’s select cloud''' '''4 and overlap it over the sun.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on drop-down next to the '''Arrange '''icon on the '''Standard toolbar'''&lt;br /&gt;
&lt;br /&gt;
Select''' Send Backward'''&lt;br /&gt;
|| To send it behind the sun, click on drop-down next to the '''Arrange '''icon on the '''Standard toolbar.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And select the''' Send Backward '''option.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| '''Send Backward''' sends an '''object '''one '''layer '''behind the present one.&lt;br /&gt;
|- &lt;br /&gt;
|| Select cloud 3 &lt;br /&gt;
&lt;br /&gt;
Click on drop-down next to the '''Arrange '''icon on the '''Standard toolbar '''&amp;gt;&amp;gt;''' '''select''' Send to Back'''&lt;br /&gt;
|| Now let’s select cloud''' '''3 and place it such that it overlaps above the sun.&lt;br /&gt;
&lt;br /&gt;
Then send it to the back of the sun by following the previous steps and select '''Send to Back.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': Sample Drawing&lt;br /&gt;
|| It now becomes simple to arrange the clouds as shown in the slide, isn't it?&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''cloud '''4 &lt;br /&gt;
&lt;br /&gt;
Click on drop-down next to the '''Arrange '''icon on the '''Standard toolbar '''&amp;gt;&amp;gt; select''' Bring to Front.'''&lt;br /&gt;
|| Let’s select cloud''' '''4 and bring it to the front.&lt;br /&gt;
&lt;br /&gt;
To do so, follow the previous steps and select the '''Bring to Front '''option.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| '''Bring to Front '''brings an object to the first '''layer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''cloud '''3 &amp;gt;&amp;gt; Click '''Arrange ''' &amp;gt;&amp;gt; '''Bring Forward.'''&lt;br /&gt;
|| Then select cloud''' '''3, '''Bring Forward'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| '''Bring Forward '''brings an '''object''' one '''layer '''ahead.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''cloud '''2 and place it partly on the top of '''cloud '''1.&lt;br /&gt;
|| Now, select cloud 2 and place it overlapping on cloud 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The clouds''' '''are now arranged as shown in the slide.&lt;br /&gt;
|- &lt;br /&gt;
|| Select cloud 1 &amp;gt;&amp;gt; double-click&lt;br /&gt;
&lt;br /&gt;
Select the number &amp;gt;&amp;gt; press '''Delete'''.&lt;br /&gt;
|| Next let’s delete the numbers from the clouds.&lt;br /&gt;
&lt;br /&gt;
To do so, select the cloud''' '''and double-click.&lt;br /&gt;
&lt;br /&gt;
Then select the number and press the '''Delete key''' on the keyboard.&lt;br /&gt;
|- &lt;br /&gt;
|| Just show the end result, no need to demonstrate&lt;br /&gt;
|| Similarly, remove the number from the other clouds''' '''too.&lt;br /&gt;
|- &lt;br /&gt;
|| Press''' CTRL+S '''keys&lt;br /&gt;
|| Press''' CTRL+S '''keys to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Trees'''&lt;br /&gt;
|| Let’s add trees, like the one shown in this slide, to the '''Water Cycle diagram'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Switch to the '''Draw '''file '''Water- Cycle'''&lt;br /&gt;
|| We shall draw a tree using '''Split arrow''' and '''star explosion objects'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Add a '''new page'''&lt;br /&gt;
&lt;br /&gt;
Go to '''Menu bar''' &amp;gt;&amp;gt; '''Page ''' &amp;gt;&amp;gt; '''New Page'''&lt;br /&gt;
|| Let us add a new '''page '''to this '''Draw '''file.&lt;br /&gt;
&lt;br /&gt;
To do that, on the '''menu bar''' click on the '''Page menu '''and then on '''New Page.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Right click on '''Page '''&amp;gt;&amp;gt; '''page '''&amp;gt;&amp;gt; '''New page'''&lt;br /&gt;
|| Alternatively you can add a new '''page''' by right-clicking on the '''page''' in the '''Page Pane.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And click on the '''New Page''' option from the '''context menu.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Shapes '''&amp;gt;&amp;gt; '''Split Arrow'''&lt;br /&gt;
|| Click on the '''Shapes '''icon in the '''Sidebar. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From '''Block Arrows section,''' select '''Split Arrow'''&lt;br /&gt;
|- &lt;br /&gt;
|| Place the '''cursor '''on the '''Draw page'''&lt;br /&gt;
&lt;br /&gt;
Hold the left '''mouse '''button and '''drag '''downwards &amp;gt;&amp;gt; release the '''mouse '''button&lt;br /&gt;
&lt;br /&gt;
Point towards the drawn '''Split arrow'''&lt;br /&gt;
|| Place the '''cursor '''on the '''page.'''&lt;br /&gt;
&lt;br /&gt;
Click and hold the left '''mouse '''button and drag''' '''downwards and sideways.&lt;br /&gt;
&lt;br /&gt;
Release the '''mouse '''button to complete the '''split arrow object.'''&lt;br /&gt;
&lt;br /&gt;
We have drawn a tree trunk with two branches!&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the tree.&lt;br /&gt;
|| Next, let us add leaves to the branches.&lt;br /&gt;
|- &lt;br /&gt;
|| Shapes &amp;gt;&amp;gt; '''Explosion'''&lt;br /&gt;
|| In the '''Shapes''' pane, Under '''Stars,''' select '''Explosion.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Move to the '''Draw page'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Place the '''cursor '''on the left '''branch '''of the '''arrow''', &lt;br /&gt;
&lt;br /&gt;
hold the left '''mouse '''button and '''drag '''left &amp;gt;&amp;gt; release the '''mouse '''button&lt;br /&gt;
&lt;br /&gt;
Point to the drawn leaves&lt;br /&gt;
|| Now, move to the '''Draw page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Place the '''cursor '''on the left branch''' '''of the arrow, hold the left '''mouse '''button and drag left.&lt;br /&gt;
&lt;br /&gt;
Release the '''mouse '''button to complete the leaves.&lt;br /&gt;
&lt;br /&gt;
So, we have now added leaves.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''x''' icon in the '''Shapes''' pane&lt;br /&gt;
|| Close the '''Shapes''' pane by clicking on the cross('''X)''' icon.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the object '''Explosion &amp;gt;&amp;gt; '''press''' CTRL+C keys''' &lt;br /&gt;
&lt;br /&gt;
Press '''CTRL+V'''.&lt;br /&gt;
&lt;br /&gt;
Select the '''copied object '''and '''move '''it to the right branch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the drawn tree&lt;br /&gt;
|| We shall copy this shape to the right branch of the tree, also.&lt;br /&gt;
&lt;br /&gt;
Select the shape and press '''CTRL + C''' keys to copy.&lt;br /&gt;
&lt;br /&gt;
Then press '''CTRL + V''' to paste.&lt;br /&gt;
&lt;br /&gt;
Select the copied''' object '''and move''' '''it to the right branch.&lt;br /&gt;
&lt;br /&gt;
We have drawn a tree!&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the tree.&lt;br /&gt;
|| Let us select the tree and move it down.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''Split Arrow ''' and move it down using the '''mouse'''.&lt;br /&gt;
|| When we do that, only the tree trunk''' '''moves down; the leaves don’t!&lt;br /&gt;
|- &lt;br /&gt;
|| Select each of the three '''objects'''.&lt;br /&gt;
|| Here the tree trunk and the two leaves''' '''are treated as separate '''objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''CTRL+Z''' to undo the action.&lt;br /&gt;
|| Let’s press '''Ctrl + Z keys''' to move the tree trunk back to where it was.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Now, we’ll learn how to '''group '''the tree trunk and the two leaves''' '''into a single unit.&lt;br /&gt;
&lt;br /&gt;
Any change made to a '''group '''is applied to all the '''objects '''within the '''group'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the page,&lt;br /&gt;
|| First click anywhere on the '''page''', so that none of the '''objects '''are selected. &lt;br /&gt;
|- &lt;br /&gt;
|| Press the left '''button '''and '''drag'''&lt;br /&gt;
|| Make sure that your '''cursor''' is at the top left of the tree '''Object'''. &lt;br /&gt;
&lt;br /&gt;
Now press the left '''mouse button '''and drag''' '''to the bottom right.&lt;br /&gt;
&lt;br /&gt;
So that all the three '''objects''' of the tree are selected.&lt;br /&gt;
|- &lt;br /&gt;
|| Point towards the '''dotted rectangle'''&lt;br /&gt;
|| A '''dotted rectangle '''is seen'''.'''&lt;br /&gt;
&lt;br /&gt;
Ensure all the '''objects '''of the tree are selected within this '''rectangle'''.&lt;br /&gt;
&lt;br /&gt;
Then release the left '''mouse''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the page&lt;br /&gt;
|| Click on the '''page''', so that none of the '''objects '''are selected.&lt;br /&gt;
|- &lt;br /&gt;
|| Pressing '''Shift key''' &amp;gt;&amp;gt; click on the''' objects'''&lt;br /&gt;
|| You can also select two or more '''objects, '''by pressing the '''Shift key''' and then clicking on each '''object'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Right click for the''' context menu '''&amp;gt;&amp;gt; Click '''Group'''.&lt;br /&gt;
|| Right click on the '''object''' &lt;br /&gt;
&lt;br /&gt;
from the '''context menu ''' select '''Group'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Now click on any '''object'''.&lt;br /&gt;
&lt;br /&gt;
Point to the eight '''handles'''.&lt;br /&gt;
|| Now click on any '''object '''in the tree.&lt;br /&gt;
&lt;br /&gt;
The '''handles '''appear as if they are part of a single '''object'''.&lt;br /&gt;
&lt;br /&gt;
These '''objects '''are now treated as a single''' '''unit.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the tree &amp;gt;&amp;gt; right-click for the '''context menu''' &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
select '''Ungroup'''.&lt;br /&gt;
&lt;br /&gt;
Select each '''object '''to show that the '''objects '''are now separate.&lt;br /&gt;
|| To ungroup them as separate objects, right-click on the '''object '''and select '''Ungroup.'''&lt;br /&gt;
&lt;br /&gt;
The '''objects '''are now '''ungrouped''' and are treated as separate '''objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click for the '''context menu''' &amp;gt;&amp;gt; select '''Group'''.&lt;br /&gt;
|| Let’s '''group '''them again.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Now, suppose we want to edit a single '''object '''within a '''group'''. What do we do?&lt;br /&gt;
&lt;br /&gt;
Let me demonstrate a simple way to do this without having to '''ungroup '''and '''regroup '''the '''objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the tree &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
right-click to view the '''context menu''' &lt;br /&gt;
&lt;br /&gt;
Click '''Enter Group'''.&lt;br /&gt;
|| Select the '''group '''and right-click for the '''context menu'''.&lt;br /&gt;
&lt;br /&gt;
Select '''Enter Group.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''leaves '''on the right-side &amp;gt;&amp;gt;''' reduce size'''.&lt;br /&gt;
|| Let us select the '''leaves '''on the right-side of the tree and reduce the size.&lt;br /&gt;
|- &lt;br /&gt;
|| Place the '''cursor '''on the page, right-click &amp;gt;&amp;gt; select '''Exit group'''.&lt;br /&gt;
|| To '''exit '''the '''group''', place the '''cursor '''on the '''tree'''.&lt;br /&gt;
&lt;br /&gt;
Right-click and select''' Exit group.'''&lt;br /&gt;
&lt;br /&gt;
We are now out of the '''Edit mode''' for the '''group'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''size '''of the '''tree'''.&lt;br /&gt;
|| Now, let’s reduce the size of the whole tree so that it fits in the '''Water-Cycle drawing'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the tree. Move the '''cursor '''over the bottom-right '''handle''' &amp;gt;&amp;gt; Drag the '''arrow '''inwards.&lt;br /&gt;
|| Select the tree, grab one of the corner handles and resize as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the tree.&lt;br /&gt;
|| The size of the whole tree has reduced!&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''tree '''&amp;gt;&amp;gt; right-click &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
click '''Cut'''. Come to the '''Water-Cycle drawing '''&amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
right-click &amp;gt;&amp;gt; click '''Paste'''.&lt;br /&gt;
|| Let us select the '''tree''', cut and paste it into the '''Water-Cycle drawing page.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Then let’s add three more trees to this diagram.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''tree '''&amp;gt;&amp;gt; Ctrl + C &amp;gt;&amp;gt; Ctrl + V twice&lt;br /&gt;
&lt;br /&gt;
'''Move '''the tree to the left.&lt;br /&gt;
|| Select the tree and press '''Ctrl + C''' and '''Ctrl + V''' keys to copy and paste.&lt;br /&gt;
&lt;br /&gt;
Repeat '''Ctrl + V''' once again.&lt;br /&gt;
&lt;br /&gt;
Then move''' '''the copied trees to the desired locations.&lt;br /&gt;
|- &lt;br /&gt;
|| Select each tree one-by-one.&lt;br /&gt;
|| Remember, each tree is made up of three '''objects grouped '''together.&lt;br /&gt;
|- &lt;br /&gt;
|| Press''' CTRL+S '''keys&lt;br /&gt;
|| Press''' CTRL+S '''keys to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the diagram.&lt;br /&gt;
|| Next, let us add a water body to the diagram.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the right '''outline '''of the '''rectangle'''.&lt;br /&gt;
|| To give the effect of water, we will add a '''triangle '''next to the '''rectangle '''and then add a '''curve'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Shapes &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Basic Shapes &amp;gt;&amp;gt; Right Triangle'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Draw it next to the '''rectangle'''.&lt;br /&gt;
|| Click on the '''Shapes '''icon in the '''Sidebar. '''&lt;br /&gt;
&lt;br /&gt;
Under '''Basic Shapes''', select''' Right Triangle.'''&lt;br /&gt;
&lt;br /&gt;
Let us draw it and place it next to the '''rectangle'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click anywhere else on the '''Draw page'''&lt;br /&gt;
|| Click anywhere else on the '''Draw page''' to deselect the drawn '''object'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Now let us draw a curve filled with color to show the movement of water.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Shapes '''&amp;gt;&amp;gt; '''Freeform Line, Filled'''&lt;br /&gt;
&lt;br /&gt;
Draw a '''curve '''next to the triangle.&lt;br /&gt;
|| In the '''Shapes '''pane, go to the''' Curves '''section.&lt;br /&gt;
&lt;br /&gt;
Select '''Freeform Line, Filled '''option.&lt;br /&gt;
&lt;br /&gt;
Then place the '''cursor '''on top of the '''triangle''', hold the left '''mouse '''button and drag''' '''it down.&lt;br /&gt;
|- &lt;br /&gt;
|| Please make the necessary '''adjustments'''.&lt;br /&gt;
|| Let’s adjust''' '''the curve''' '''so that it looks like flowing water.&lt;br /&gt;
|- &lt;br /&gt;
|| Hold Shift and select Right Triangle and Curve&lt;br /&gt;
&lt;br /&gt;
Right-click &amp;gt;&amp;gt;Click '''Group'''.&lt;br /&gt;
|| The triangle''' '''and the curve''' '''together create water, so let’s '''group '''them as a single '''object'''.&lt;br /&gt;
&lt;br /&gt;
By holding the '''SHIFT''' key, select the '''Right Triangle''' and the '''Curve objects.'''&lt;br /&gt;
&lt;br /&gt;
Right-click and select '''Group'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
&lt;br /&gt;
'''Ctrl + S'''&lt;br /&gt;
|| We have now created the basic '''objects''' in the '''Water-Cycle diagram'''.&lt;br /&gt;
&lt;br /&gt;
Save all the changes and close the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| This brings us to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Let us summarize.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''':''' Summary'''&lt;br /&gt;
|| In this tutorial, we have learnt to:&lt;br /&gt;
* Cut, copy, paste''' objects'''&lt;br /&gt;
* Resize''' objects''' dynamically using '''handles'''&lt;br /&gt;
* Arrange '''objects'''&lt;br /&gt;
* Group and '''ungroup objects'''&lt;br /&gt;
* Edit''' '''individual '''objects''' in a '''group'''&lt;br /&gt;
* Move''' objects''' within a '''group'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Assignment.'''&lt;br /&gt;
|| Here is an assignment for you.&lt;br /&gt;
&lt;br /&gt;
Open '''MyPractice.odg''' file.&lt;br /&gt;
&lt;br /&gt;
Add a page, create this picture on your own.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Assignment'''&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
&lt;br /&gt;
* On a new page draw a '''circle''', a '''square '''and a '''star '''and place them as shown.&lt;br /&gt;
* Select each '''object '''and apply each option from the '''Arrange '''menu.&lt;br /&gt;
* Check how the placements''' '''of '''objects '''change for each option.&lt;br /&gt;
* Now, place the '''objects '''as shown and&lt;br /&gt;
* Check the '''Bring to Front''' and '''Behind Object''' options.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''About Spoken Tutorial Project'''&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Spoken tutorial workshops'''&lt;br /&gt;
|| &lt;br /&gt;
* Spoken Tutorial project conducts workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please contact us.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Forums'''&lt;br /&gt;
|| Please post your timed queries in this forum.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Acknowledgement'''&lt;br /&gt;
|| '''Spoken Tutorial''' project is funded by the Ministry of Education (MoE), Govt. Of India.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Thank you'''&lt;br /&gt;
|| This tutorial was originally contributed by DesiCrew Solutions Pvt. Ltd. in 2011&lt;br /&gt;
&lt;br /&gt;
The script for this tutorial was written by Nikita Misal from IIT Bombay.&lt;br /&gt;
&lt;br /&gt;
And this is Madhuri Ganapathi along with the Spoken Tutorial team signing off. &lt;br /&gt;
&lt;br /&gt;
Thank you for watching.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C2/Working-with-Objects/English</id>
		<title>LibreOffice-Suite-Draw-6.3/C2/Working-with-Objects/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C2/Working-with-Objects/English"/>
				<updated>2021-03-30T17:54:52Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{|border=1&lt;br /&gt;
||'''Visual Cue'''&lt;br /&gt;
||'''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Title Slide'''&lt;br /&gt;
|| Welcome to the''' spoken tutorial '''on '''Working with Objects.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''':''' Learning Objectives'''&lt;br /&gt;
|| In this tutorial, you will learn how to:&lt;br /&gt;
* Cut, copy, and paste''' objects'''&lt;br /&gt;
* Resize''' objects''' dynamically using '''handles'''&lt;br /&gt;
* Arrange '''objects'''&lt;br /&gt;
* Group and ungroup''' objects'''&lt;br /&gt;
* Edit''' '''individual '''objects''' in a '''group '''and&lt;br /&gt;
* Move''' objects''' within a '''group'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''System Requirements '''&lt;br /&gt;
|| This tutorial is recorded using &lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux '''OS version 18.04 and &lt;br /&gt;
* '''LibreOffice Suite''' version 6.3.5&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to '''Water-Cycle'''.odg&lt;br /&gt;
|| Let’s open our '''Water'''-'''Cycle'''.'''odg''' file which we created earlier in this series.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Code files'''&lt;br /&gt;
||&lt;br /&gt;
* This file has been provided to you in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Please download and extract the file.&lt;br /&gt;
* Make a copy and then use it for practising.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the draw page.&lt;br /&gt;
|| Now, let’s copy and paste''' '''three more clouds.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''cloud ''' &amp;gt;&amp;gt; Right-click to view the '''context menu''' &amp;gt;&amp;gt; Click '''Copy'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Place the '''cursor '''next to the cloud &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Right-click for the '''context menu''' &amp;gt;&amp;gt; Click '''Paste'''.&lt;br /&gt;
|| First select the cloud in the page and right-click to view the '''context menu.'''&lt;br /&gt;
&lt;br /&gt;
Select the option '''Copy'''.&lt;br /&gt;
&lt;br /&gt;
Then, place the '''cursor '''anywhere on the page.&lt;br /&gt;
&lt;br /&gt;
Right-click for the '''context menu''' and select '''Paste'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''cloud'''&lt;br /&gt;
|| But we can see only one cloud!&lt;br /&gt;
&lt;br /&gt;
Where is the cloud which we copied and pasted? &lt;br /&gt;
&lt;br /&gt;
The copied cloud has been pasted on top''' '''of the original cloud!&lt;br /&gt;
|- &lt;br /&gt;
|| '''Move '''the '''cloud '''to the left&lt;br /&gt;
|| Let us select the cloud''' '''and move''' '''it to the left.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now we can see both the clouds.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us create one more cloud''' '''in the same manner.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the second '''cloud ''' &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Right-click to view the '''context menu''' &amp;gt;&amp;gt; Click '''Copy '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Right-click for the '''context menu''' &amp;gt;&amp;gt; Click '''Paste'''.&lt;br /&gt;
|| Select the cloud.&lt;br /&gt;
&lt;br /&gt;
Right-click and select '''Copy.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Again right-click select '''Paste'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select and move the '''copied cloud '''to the left.&lt;br /&gt;
|| Now, select the copied cloud and move it to the left.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Shortcut Keys'''&lt;br /&gt;
|| We can also use shortcut keys to make copies of '''objects'''.&lt;br /&gt;
&lt;br /&gt;
* '''CTRL + C''' to copy an '''object'''&lt;br /&gt;
* '''CTRL + V''' to paste an '''object'''&lt;br /&gt;
* '''CTRL + X''' to cut an '''object'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to the '''Draw '''file.&lt;br /&gt;
&lt;br /&gt;
Select the third cloud you copied&lt;br /&gt;
&lt;br /&gt;
Press the '''CTRL + C''' keys together&lt;br /&gt;
|| Switch back to the '''Draw '''file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the cloud and press '''CTRL '''and '''C''' keys together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The cloud has been copied.&lt;br /&gt;
|- &lt;br /&gt;
||Press '''CTRL+ V''' keys together &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the '''cloud '''and move it to the left.&lt;br /&gt;
|| To paste, press '''CTRL '''and '''V '''keys together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now select the cloud''' '''and move it to the desired location.&lt;br /&gt;
|- &lt;br /&gt;
|| Press''' CTRL+ S '''keys&lt;br /&gt;
|| Press''' CTRL''' and '''S '''keys to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Text on screen: Set the '''Automatic Save''' option&lt;br /&gt;
|| To avoid accidental loss of work, set the '''Automatic Save''' option. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That way your changes are saved automatically.&lt;br /&gt;
|- &lt;br /&gt;
 &lt;br /&gt;
|| Select the first '''arrow '''on the left side of the '''page '''&lt;br /&gt;
&lt;br /&gt;
Place the '''cursor '''on the bottom '''handle '''&lt;br /&gt;
|| Now, let’s see how to resize the arrow '''object'''.&lt;br /&gt;
&lt;br /&gt;
First select the arrow '''object''' and move the '''cursor '''very slowly over one of the '''handles'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Wait for the small '''arrow '''to appear.&lt;br /&gt;
|| A small transparent arrow with a square beneath appears at the '''cursor '''tip.&lt;br /&gt;
|- &lt;br /&gt;
|| Press the '''Shift key'''&lt;br /&gt;
&lt;br /&gt;
Click the left '''mouse '''button.&lt;br /&gt;
&lt;br /&gt;
Pull the '''arrow '''a little down.&lt;br /&gt;
|| Now, press the '''Shift '''key on the '''keyboard'''.&lt;br /&gt;
&lt;br /&gt;
Click the left '''mouse '''button.&lt;br /&gt;
&lt;br /&gt;
Using the arrow’s''' handle, '''drag it down and release the '''mouse '''button and the '''Shift '''key.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + Z'''&lt;br /&gt;
|| It is much easier to resize line and arrow '''objects''' if you press the '''Shift key'''.&lt;br /&gt;
&lt;br /&gt;
If we don’t then the line and arrow will not be straight.&lt;br /&gt;
&lt;br /&gt;
Let us undo all these changes we made for the arrow.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Dynamic Resizing'''&lt;br /&gt;
||&lt;br /&gt;
* Resizing''' '''using the '''handles '''of an '''object '''is called '''Dynamic Resizing'''&lt;br /&gt;
* This means we do not use exact measurements.&lt;br /&gt;
&lt;br /&gt;
We will learn to exactly resize '''objects''' in later tutorials.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the rectangle&lt;br /&gt;
&lt;br /&gt;
Select the '''rectangle''' &amp;gt;&amp;gt; Place the '''cursor '''on the right '''handle '''&lt;br /&gt;
&lt;br /&gt;
Press the '''Shift key''' and drag it upward&lt;br /&gt;
|| Next, let’s increase the width of this rectangle '''object'''.&lt;br /&gt;
&lt;br /&gt;
Select the '''rectangle''', grab one of the corner '''handles''' by clicking the left '''mouse '''button. &lt;br /&gt;
&lt;br /&gt;
Press the '''Shift key''' on the keyboard and drag it upward.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the right of the '''Status bar '''.&lt;br /&gt;
&lt;br /&gt;
Select the '''rectangle '''&amp;gt;&amp;gt; Hold the '''Shift key'''&lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; select the middle-left '''handle '''and enlarge it &amp;gt;&amp;gt; Point to right of the '''Status bar'''&lt;br /&gt;
|| Look at the '''Status bar''', at the bottom of the '''Draw '''window.&lt;br /&gt;
&lt;br /&gt;
Note that when we resize the rectangle''' '''again, the '''dimensions '''change.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''object information '''area and then the '''position '''and the '''dimension'''.&lt;br /&gt;
|| The '''Status bar''' shows the change in '''position '''and '''dimension '''of the '''object''' at the bottom.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Sample Drawing'''&lt;br /&gt;
|| Now let’s arrange the clouds and the sun as shown here.&lt;br /&gt;
|- &lt;br /&gt;
|| Press''' CTRL+S '''keys&lt;br /&gt;
|| Press''' CTRL+S '''keys to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the clouds.&lt;br /&gt;
|| To identify the clouds, let’s number them 1, 2, 3, 4, starting from left to right.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the first cloud to the left &lt;br /&gt;
&lt;br /&gt;
&amp;gt;&amp;gt; Double-click &amp;gt;&amp;gt; Type 1.&lt;br /&gt;
|| To insert the numbers, let’s select the first cloud, double-click''' '''and type 1.&lt;br /&gt;
|- &lt;br /&gt;
|| Just show the end result, no need to demonstrate&lt;br /&gt;
|| Similarly, number the other clouds''' '''too.&lt;br /&gt;
|- &lt;br /&gt;
|| point to the icons.&lt;br /&gt;
|| If you have resized your '''LibreOffice''' window, some of the icons may not be visible.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on Double arrow '''&amp;gt;&amp;gt;''' &lt;br /&gt;
&lt;br /&gt;
icon at the end of the '''toolbars'''&lt;br /&gt;
|| In that case, click on the '''double arrow''' icon at the end of the '''toolbar''' to see the hidden icons.&lt;br /&gt;
|- &lt;br /&gt;
|| Select cloud 4 &amp;gt;&amp;gt; drag and drop it above the sun &lt;br /&gt;
|| Now, let’s select cloud''' '''4 and overlap it over the sun.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on drop-down next to the '''Arrange '''icon on the '''Standard toolbar'''&lt;br /&gt;
&lt;br /&gt;
Select''' Send Backward'''&lt;br /&gt;
|| To send it behind the sun, click on drop-down next to the '''Arrange '''icon on the '''Standard toolbar.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And select the''' Send Backward '''option.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| '''Send Backward''' sends an '''object '''one '''layer '''behind the present one.&lt;br /&gt;
|- &lt;br /&gt;
|| Select cloud 3 &lt;br /&gt;
&lt;br /&gt;
Click on drop-down next to the '''Arrange '''icon on the '''Standard toolbar '''&amp;gt;&amp;gt;''' '''select''' Send to Back'''&lt;br /&gt;
|| Now let’s select cloud''' '''3 and place it such that it overlaps above the sun.&lt;br /&gt;
&lt;br /&gt;
Then send it to the back of the sun by following the previous steps and select '''Send to Back.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': Sample Drawing&lt;br /&gt;
|| It now becomes simple to arrange the clouds as shown in the slide, isn't it?&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''cloud '''4 &lt;br /&gt;
&lt;br /&gt;
Click on drop-down next to the '''Arrange '''icon on the '''Standard toolbar '''&amp;gt;&amp;gt; select''' Bring to Front.'''&lt;br /&gt;
|| Let’s select cloud''' '''4 and bring it to the front.&lt;br /&gt;
&lt;br /&gt;
To do so, follow the previous steps and select the '''Bring to Front '''option.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| '''Bring to Front '''brings an object to the first '''layer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''cloud '''3 &amp;gt;&amp;gt; Click '''Arrange ''' &amp;gt;&amp;gt; '''Bring Forward.'''&lt;br /&gt;
|| Then select cloud''' '''3, '''Bring Forward'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| '''Bring Forward '''brings an '''object''' one '''layer '''ahead.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''cloud '''2 and place it partly on the top of '''cloud '''1.&lt;br /&gt;
|| Now, select cloud 2 and place it overlapping on cloud 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The clouds''' '''are now arranged as shown in the slide.&lt;br /&gt;
|- &lt;br /&gt;
|| Select cloud 1 &amp;gt;&amp;gt; double-click&lt;br /&gt;
&lt;br /&gt;
Select the number &amp;gt;&amp;gt; press '''Delete'''.&lt;br /&gt;
|| Next let’s delete the numbers from the clouds.&lt;br /&gt;
&lt;br /&gt;
To do so, select the cloud''' '''and double-click.&lt;br /&gt;
&lt;br /&gt;
Then select the number and press the '''Delete key''' on the keyboard.&lt;br /&gt;
|- &lt;br /&gt;
|| Just show the end result, no need to demonstrate&lt;br /&gt;
|| Similarly, remove the number from the other clouds''' '''too.&lt;br /&gt;
|- &lt;br /&gt;
|| Press''' CTRL+S '''keys&lt;br /&gt;
|| Press''' CTRL+S '''keys to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Assignment'''&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
&lt;br /&gt;
* On a new page draw a '''circle''', a '''square '''and a '''star '''and place them as shown.&lt;br /&gt;
* Select each '''object '''and apply each option from the '''Arrange '''menu.&lt;br /&gt;
* Check how the placements''' '''of '''objects '''change for each option.&lt;br /&gt;
* Now, place the '''objects '''as shown and&lt;br /&gt;
* Check the '''Bring to Front''' and '''Behind Object''' options.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Trees'''&lt;br /&gt;
|| Let’s add trees, like the one shown in this slide, to the '''Water Cycle diagram'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Switch to the '''Draw '''file '''Water- Cycle'''&lt;br /&gt;
|| We shall draw a tree using '''Split arrow''' and '''star explosion objects'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Add a '''new page'''&lt;br /&gt;
&lt;br /&gt;
Go to '''Menu bar''' &amp;gt;&amp;gt; '''Page ''' &amp;gt;&amp;gt; '''New Page'''&lt;br /&gt;
|| Let us add a new '''page '''to this '''Draw '''file.&lt;br /&gt;
&lt;br /&gt;
To do that, on the '''menu bar''' click on the '''Page menu '''and then on '''New Page.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Right click on '''Page '''&amp;gt;&amp;gt; '''page '''&amp;gt;&amp;gt; '''New page'''&lt;br /&gt;
|| Alternatively you can add a new '''page''' by right-clicking on the '''page''' in the '''Page Pane.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And click on the '''New Page''' option from the '''context menu.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Shapes '''&amp;gt;&amp;gt; '''Split Arrow'''&lt;br /&gt;
|| Click on the '''Shapes '''icon in the '''Sidebar. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
From '''Block Arrows section,''' select '''Split Arrow'''&lt;br /&gt;
|- &lt;br /&gt;
|| Place the '''cursor '''on the '''Draw page'''&lt;br /&gt;
&lt;br /&gt;
Hold the left '''mouse '''button and '''drag '''downwards &amp;gt;&amp;gt; release the '''mouse '''button&lt;br /&gt;
&lt;br /&gt;
Point towards the drawn '''Split arrow'''&lt;br /&gt;
|| Place the '''cursor '''on the '''page.'''&lt;br /&gt;
&lt;br /&gt;
Click and hold the left '''mouse '''button and drag''' '''downwards and sideways.&lt;br /&gt;
&lt;br /&gt;
Release the '''mouse '''button to complete the '''split arrow object.'''&lt;br /&gt;
&lt;br /&gt;
We have drawn a tree trunk with two branches!&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the tree.&lt;br /&gt;
|| Next, let us add leaves to the branches.&lt;br /&gt;
|- &lt;br /&gt;
|| Shapes &amp;gt;&amp;gt; '''Explosion'''&lt;br /&gt;
|| In the '''Shapes''' pane, Under '''Stars,''' select '''Explosion.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Move to the '''Draw page'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Place the '''cursor '''on the left '''branch '''of the '''arrow''', &lt;br /&gt;
&lt;br /&gt;
hold the left '''mouse '''button and '''drag '''left &amp;gt;&amp;gt; release the '''mouse '''button&lt;br /&gt;
&lt;br /&gt;
Point to the drawn leaves&lt;br /&gt;
|| Now, move to the '''Draw page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Place the '''cursor '''on the left branch''' '''of the arrow, hold the left '''mouse '''button and drag left.&lt;br /&gt;
&lt;br /&gt;
Release the '''mouse '''button to complete the leaves.&lt;br /&gt;
&lt;br /&gt;
So, we have now added leaves.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''x''' icon in the '''Shapes''' pane&lt;br /&gt;
|| Close the '''Shapes''' pane by clicking on the cross('''X)''' icon.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the object '''Explosion &amp;gt;&amp;gt; '''press''' CTRL+C keys''' &lt;br /&gt;
&lt;br /&gt;
Press '''CTRL+V'''.&lt;br /&gt;
&lt;br /&gt;
Select the '''copied object '''and '''move '''it to the right branch.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the drawn tree&lt;br /&gt;
|| We shall copy this shape to the right branch of the tree, also.&lt;br /&gt;
&lt;br /&gt;
Select the shape and press '''CTRL + C''' keys to copy.&lt;br /&gt;
&lt;br /&gt;
Then press '''CTRL + V''' to paste.&lt;br /&gt;
&lt;br /&gt;
Select the copied''' object '''and move''' '''it to the right branch.&lt;br /&gt;
&lt;br /&gt;
We have drawn a tree!&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the tree.&lt;br /&gt;
|| Let us select the tree and move it down.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''Split Arrow ''' and move it down using the '''mouse'''.&lt;br /&gt;
|| When we do that, only the tree trunk''' '''moves down; the leaves don’t!&lt;br /&gt;
|- &lt;br /&gt;
|| Select each of the three '''objects'''.&lt;br /&gt;
|| Here the tree trunk and the two leaves''' '''are treated as separate '''objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''CTRL+Z''' to undo the action.&lt;br /&gt;
|| Let’s press '''Ctrl + Z keys''' to move the tree trunk back to where it was.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Now, we’ll learn how to '''group '''the tree trunk and the two leaves''' '''into a single unit.&lt;br /&gt;
&lt;br /&gt;
Any change made to a '''group '''is applied to all the '''objects '''within the '''group'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the page,&lt;br /&gt;
|| First click anywhere on the '''page''', so that none of the '''objects '''are selected. &lt;br /&gt;
|- &lt;br /&gt;
|| Press the left '''button '''and '''drag'''&lt;br /&gt;
|| Make sure that your '''cursor''' is at the top left of the tree '''Object'''. &lt;br /&gt;
&lt;br /&gt;
Now press the left '''mouse button '''and drag''' '''to the bottom right.&lt;br /&gt;
&lt;br /&gt;
So that all the three '''objects''' of the tree are selected.&lt;br /&gt;
|- &lt;br /&gt;
|| Point towards the '''dotted rectangle'''&lt;br /&gt;
|| A '''dotted rectangle '''is seen'''.'''&lt;br /&gt;
&lt;br /&gt;
Ensure all the '''objects '''of the tree are selected within this '''rectangle'''.&lt;br /&gt;
&lt;br /&gt;
Then release the left '''mouse''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the page&lt;br /&gt;
|| Click on the '''page''', so that none of the '''objects '''are selected.&lt;br /&gt;
|- &lt;br /&gt;
|| Pressing '''Shift key''' &amp;gt;&amp;gt; click on the''' objects'''&lt;br /&gt;
|| You can also select two or more '''objects, '''by pressing the '''Shift key''' and then clicking on each '''object'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Right click for the''' context menu '''&amp;gt;&amp;gt; Click '''Group'''.&lt;br /&gt;
|| Right click on the '''object''' &lt;br /&gt;
&lt;br /&gt;
from the '''context menu ''' select '''Group'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Now click on any '''object'''.&lt;br /&gt;
&lt;br /&gt;
Point to the eight '''handles'''.&lt;br /&gt;
|| Now click on any '''object '''in the tree.&lt;br /&gt;
&lt;br /&gt;
The '''handles '''appear as if they are part of a single '''object'''.&lt;br /&gt;
&lt;br /&gt;
These '''objects '''are now treated as a single''' '''unit.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the tree &amp;gt;&amp;gt; right-click for the '''context menu''' &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
select '''Ungroup'''.&lt;br /&gt;
&lt;br /&gt;
Select each '''object '''to show that the '''objects '''are now separate.&lt;br /&gt;
|| To ungroup them as separate objects, right-click on the '''object '''and select '''Ungroup.'''&lt;br /&gt;
&lt;br /&gt;
The '''objects '''are now '''ungrouped''' and are treated as separate '''objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click for the '''context menu''' &amp;gt;&amp;gt; select '''Group'''.&lt;br /&gt;
|| Let’s '''group '''them again.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Now, suppose we want to edit a single '''object '''within a '''group'''. What do we do?&lt;br /&gt;
&lt;br /&gt;
Let me demonstrate a simple way to do this without having to '''ungroup '''and '''regroup '''the '''objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the tree &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
right-click to view the '''context menu''' &lt;br /&gt;
&lt;br /&gt;
Click '''Enter Group'''.&lt;br /&gt;
|| Select the '''group '''and right-click for the '''context menu'''.&lt;br /&gt;
&lt;br /&gt;
Select '''Enter Group.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''leaves '''on the right-side &amp;gt;&amp;gt;''' reduce size'''.&lt;br /&gt;
|| Let us select the '''leaves '''on the right-side of the tree and reduce the size.&lt;br /&gt;
|- &lt;br /&gt;
|| Place the '''cursor '''on the page, right-click &amp;gt;&amp;gt; select '''Exit group'''.&lt;br /&gt;
|| To '''exit '''the '''group''', place the '''cursor '''on the '''tree'''.&lt;br /&gt;
&lt;br /&gt;
Right-click and select''' Exit group.'''&lt;br /&gt;
&lt;br /&gt;
We are now out of the '''Edit mode''' for the '''group'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''size '''of the '''tree'''.&lt;br /&gt;
|| Now, let’s reduce the size of the whole tree so that it fits in the '''Water-Cycle drawing'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the tree. Move the '''cursor '''over the bottom-right '''handle''' &amp;gt;&amp;gt; Drag the '''arrow '''inwards.&lt;br /&gt;
|| Select the tree, grab one of the corner handles and resize as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the tree.&lt;br /&gt;
|| The size of the whole tree has reduced!&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''tree '''&amp;gt;&amp;gt; right-click &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
click '''Cut'''. Come to the '''Water-Cycle drawing '''&amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
right-click &amp;gt;&amp;gt; click '''Paste'''.&lt;br /&gt;
|| Let us select the '''tree''', cut and paste it into the '''Water-Cycle drawing page.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Then let’s add three more trees to this diagram.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''tree '''&amp;gt;&amp;gt; Ctrl + C &amp;gt;&amp;gt; Ctrl + V twice&lt;br /&gt;
&lt;br /&gt;
'''Move '''the tree to the left.&lt;br /&gt;
|| Select the tree and press '''Ctrl + C''' and '''Ctrl + V''' keys to copy and paste.&lt;br /&gt;
&lt;br /&gt;
Repeat '''Ctrl + V''' once again.&lt;br /&gt;
&lt;br /&gt;
Then move''' '''the copied trees to the desired locations.&lt;br /&gt;
|- &lt;br /&gt;
|| Select each tree one-by-one.&lt;br /&gt;
|| Remember, each tree is made up of three '''objects grouped '''together.&lt;br /&gt;
|- &lt;br /&gt;
|| Press''' CTRL+S '''keys&lt;br /&gt;
|| Press''' CTRL+S '''keys to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the diagram.&lt;br /&gt;
|| Next, let us add a water body to the diagram.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the right '''outline '''of the '''rectangle'''.&lt;br /&gt;
|| To give the effect of water, we will add a '''triangle '''next to the '''rectangle '''and then add a '''curve'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Shapes &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Basic Shapes &amp;gt;&amp;gt; Right Triangle'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Draw it next to the '''rectangle'''.&lt;br /&gt;
|| Click on the '''Shapes '''icon in the '''Sidebar. '''&lt;br /&gt;
&lt;br /&gt;
Under '''Basic Shapes''', select''' Right Triangle.'''&lt;br /&gt;
&lt;br /&gt;
Let us draw it and place it next to the '''rectangle'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click anywhere else on the '''Draw page'''&lt;br /&gt;
|| Click anywhere else on the '''Draw page''' to deselect the drawn '''object'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Now let us draw a curve filled with color to show the movement of water.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Shapes '''&amp;gt;&amp;gt; '''Freeform Line, Filled'''&lt;br /&gt;
&lt;br /&gt;
Draw a '''curve '''next to the triangle.&lt;br /&gt;
|| In the '''Shapes '''pane, go to the''' Curves '''section.&lt;br /&gt;
&lt;br /&gt;
Select '''Freeform Line, Filled '''option.&lt;br /&gt;
&lt;br /&gt;
Then place the '''cursor '''on top of the '''triangle''', hold the left '''mouse '''button and drag''' '''it down.&lt;br /&gt;
|- &lt;br /&gt;
|| Please make the necessary '''adjustments'''.&lt;br /&gt;
|| Let’s adjust''' '''the curve''' '''so that it looks like flowing water.&lt;br /&gt;
|- &lt;br /&gt;
|| Hold Shift and select Right Triangle and Curve&lt;br /&gt;
&lt;br /&gt;
Right-click &amp;gt;&amp;gt;Click '''Group'''.&lt;br /&gt;
|| The triangle''' '''and the curve''' '''together create water, so let’s '''group '''them as a single '''object'''.&lt;br /&gt;
&lt;br /&gt;
By holding the '''SHIFT''' key, select the '''Right Triangle''' and the '''Curve objects.'''&lt;br /&gt;
&lt;br /&gt;
Right-click and select '''Group'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
&lt;br /&gt;
'''Ctrl + S'''&lt;br /&gt;
|| We have now created the basic '''objects''' in the '''Water-Cycle diagram'''.&lt;br /&gt;
&lt;br /&gt;
Save all the changes and close the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| This brings us to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Let us summarize.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''':''' Summary'''&lt;br /&gt;
|| In this tutorial, we have learnt to:&lt;br /&gt;
* Cut, copy, paste''' objects'''&lt;br /&gt;
* Resize''' objects''' dynamically using '''handles'''&lt;br /&gt;
* Arrange '''objects'''&lt;br /&gt;
* Group and '''ungroup objects'''&lt;br /&gt;
* Edit''' '''individual '''objects''' in a '''group'''&lt;br /&gt;
* Move''' objects''' within a '''group'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Assignment.'''&lt;br /&gt;
|| Here is an assignment for you.&lt;br /&gt;
&lt;br /&gt;
Open '''MyPractice.odg''' file.&lt;br /&gt;
&lt;br /&gt;
Add a page, create this picture on your own.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''About Spoken Tutorial Project'''&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Spoken tutorial workshops'''&lt;br /&gt;
|| &lt;br /&gt;
* Spoken Tutorial project conducts workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please contact us.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Forums'''&lt;br /&gt;
|| Please post your timed queries in this forum.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Acknowledgement'''&lt;br /&gt;
|| '''Spoken Tutorial''' project is funded by the Ministry of Education (MoE), Govt. Of India.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Thank you'''&lt;br /&gt;
|| This tutorial was originally contributed by DesiCrew Solutions Pvt. Ltd. in 2011&lt;br /&gt;
&lt;br /&gt;
The script for this tutorial was written by Nikita Misal from IIT Bombay.&lt;br /&gt;
&lt;br /&gt;
And this is Madhuri Ganapathi along with the Spoken Tutorial team signing off. Thank you for watching.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C2/Drawing-Basic-Objects/English</id>
		<title>LibreOffice-Suite-Draw-6.3/C2/Drawing-Basic-Objects/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LibreOffice-Suite-Draw-6.3/C2/Drawing-Basic-Objects/English"/>
				<updated>2021-03-30T17:30:44Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{|border=1&lt;br /&gt;
||'''Visual Cue'''&lt;br /&gt;
||'''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Title Slide'''&lt;br /&gt;
|| Welcome to the '''Spoken tutorial '''on''' Drawing Basic Objects. '''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Learning objectives'''&lt;br /&gt;
|| In this tutorial, we will learn to:&lt;br /&gt;
&lt;br /&gt;
* Draw some more basic shapes &lt;br /&gt;
* Use the '''Shapes deck''' options for drawing '''objects'''&lt;br /&gt;
* Select, move and delete''' '''an '''object'''&lt;br /&gt;
* Use the '''Rulers '''&lt;br /&gt;
* Change the size of an''' object '''with the '''Rulers '''and &lt;br /&gt;
* Use the '''Align toolbar''' to position '''objects '''on the '''page'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''System Requirements'''&lt;br /&gt;
|| This tutorial is recorded using,&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04 and &lt;br /&gt;
* '''LibreOffice Suite''' version 6.3.5&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Object'''&lt;br /&gt;
|| Let us first define what an '''object''' is.&lt;br /&gt;
&lt;br /&gt;
* The term '''object''' denotes shapes or groups of shapes.&lt;br /&gt;
* In '''Draw''', '''objects '''are used for lines, squares, arrows, '''flowcharts''' and so on.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Objects'''&lt;br /&gt;
|| All the shapes shown in this slide are referred to as '''objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to '''Water-Cycle'''.odg&lt;br /&gt;
|| Let’s open our '''Water'''-'''Cycle'''.'''odg''' file which we created earlier in this series. &lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide: Code Files'''&lt;br /&gt;
|| &lt;br /&gt;
* This file has been provided to you in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Please download and extract the file.&lt;br /&gt;
* Make a copy and then use it for practising.&lt;br /&gt;
|-&lt;br /&gt;
|| Place the cursor over the cloud &amp;gt;&amp;gt; Click on it.&lt;br /&gt;
|| We will first learn how to select an '''object'''.&lt;br /&gt;
&lt;br /&gt;
Let’s say, we want to select the '''cloud'''. &lt;br /&gt;
&lt;br /&gt;
To do so, simply click on it.&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the '''8 handles.'''&lt;br /&gt;
|| We can see eight''' handles''' on the cloud '''object'''.&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the '''8 handles.'''&lt;br /&gt;
|| '''Handles '''are small squares on the sides of the selected '''object'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the handle &amp;gt;&amp;gt; click left mouse button and drag length first &amp;gt;&amp;gt; then drag breadth&lt;br /&gt;
|| Using the '''mouse''', click on any of the side''' handles.'''&lt;br /&gt;
&lt;br /&gt;
Then drag to increase or decrease the size of the '''object'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl+ Z''' keys twice.&lt;br /&gt;
|| Undo these changes by pressing '''Ctrl '''and''' Z''' keys twice.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the corner handles&lt;br /&gt;
|| We can even scale both dimensions using the corner '''handles'''.&lt;br /&gt;
&lt;br /&gt;
When we do that, the proportions are maintained.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on Image &amp;gt;&amp;gt; resize using the corner handle &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Drag to the top right corner &lt;br /&gt;
|| Resize the '''object''' by clicking a corner '''handle''' and dragging the mouse, like this.&lt;br /&gt;
&lt;br /&gt;
After resizing, click on the''' '''cloud '''object''', drag and place it next to the sun '''object''', like this.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + S''' keys &lt;br /&gt;
|| Press '''Ctrl + S''' keys to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Let us add some more '''objects''' to our drawing.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Shapes '''icon in the '''Sidebar '''&lt;br /&gt;
|| Click on the '''Shapes '''icon in the '''Sidebar. &lt;br /&gt;
&lt;br /&gt;
'''This is the shortcut to open all the shapes at once.&lt;br /&gt;
&lt;br /&gt;
The '''Shapes deck''' expands and displays many shape '''objects''' to choose from.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''Rectangle'''&lt;br /&gt;
|| Under '''Basic Shapes,''' select '''Rectangle.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Move the '''cursor '''to the '''page'''.&lt;br /&gt;
&lt;br /&gt;
Point to the cursor.&lt;br /&gt;
&lt;br /&gt;
Hold and drag the left mouse button to draw a rectangle.&lt;br /&gt;
&lt;br /&gt;
Release the mouse button.&lt;br /&gt;
|| Now move the '''cursor''' to the '''page'''.&lt;br /&gt;
&lt;br /&gt;
You will see a '''plus''' sign with a '''capital I'''.&lt;br /&gt;
&lt;br /&gt;
Hold the left mouse button and drag to draw a rectangle, as shown here. &lt;br /&gt;
&lt;br /&gt;
Now release the mouse button to complete the rectangle.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + S''' keys &lt;br /&gt;
|| Press '''Ctrl + S''' keys to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Next, let us draw some arrows. &lt;br /&gt;
&lt;br /&gt;
This is to show the rising of water vapour from the ground to the cloud.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Shapes '''&amp;gt;&amp;gt; '''Insert Line'''&lt;br /&gt;
|| In the '''Shapes deck''', under '''Lines and Arrows,''' select '''Insert Line.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Move the '''cursor '''to the page.&lt;br /&gt;
&lt;br /&gt;
Wait until a '''plus sign '''with a '''slash '''is seen.&lt;br /&gt;
|| Move the '''cursor''' to the page.&lt;br /&gt;
&lt;br /&gt;
You will see a '''plus''' '''sign''' with a '''slash'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Hold the left mouse''' '''button and drag .&lt;br /&gt;
|| Hold the left mouse button and drag from top to bottom, as shown.&lt;br /&gt;
&lt;br /&gt;
Now release the mouse button to complete the line.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the two '''handles'''.&lt;br /&gt;
|| A line has two '''handles'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click for the &lt;br /&gt;
&lt;br /&gt;
context menu &amp;gt;&amp;gt; '''Line'''.&lt;br /&gt;
&lt;br /&gt;
|| Now, let us add an arrowhead to this line.&lt;br /&gt;
&lt;br /&gt;
Right-click on the line to view the context''' '''menu.&lt;br /&gt;
&lt;br /&gt;
Then click on the '''Line '''option.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Line dialog '''box&lt;br /&gt;
|| The '''Line''' dialog box opens up.&lt;br /&gt;
&lt;br /&gt;
Several tabs and options are seen here.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Arrow Styles''' tab&lt;br /&gt;
&lt;br /&gt;
Click on the '''Arrow Style''' drop-down &lt;br /&gt;
|| Now, click on the '''Arrow Styles''' tab at the top.&lt;br /&gt;
&lt;br /&gt;
Under '''Organize Arrow Styles''' options, click on the '''Arrow style''' drop-down.&lt;br /&gt;
|- &lt;br /&gt;
|| Scroll the drop-down option&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the option &amp;gt;&amp;gt; “'''Small arrow'''” &amp;gt;&amp;gt; Click on '''OK'''.&lt;br /&gt;
|| Scroll to see all the available '''Arrow styles'''.&lt;br /&gt;
&lt;br /&gt;
Select the option named '''Small arrow''' and click on the '''OK '''button. &lt;br /&gt;
|- &lt;br /&gt;
|| Point to both ends of the '''line'''&lt;br /&gt;
|| This will add the selected style to the line.&lt;br /&gt;
|- &lt;br /&gt;
|| Click anywhere else on the workspace&lt;br /&gt;
&lt;br /&gt;
Point to both the arrowheads&lt;br /&gt;
|| Click anywhere else on the workspace to deselect the line '''object'''.&lt;br /&gt;
&lt;br /&gt;
There are arrowheads on both ends of the line.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the upper end of the '''line'''.&lt;br /&gt;
|| But we need an arrowhead on only one end of the line.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''CTRL + Z'''.&lt;br /&gt;
|| So first we will undo this change by pressing &lt;br /&gt;
&lt;br /&gt;
'''CTRL + Z''' keys.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-Click on the “'''Line'''”&lt;br /&gt;
&lt;br /&gt;
Click on '''Line''' option.&lt;br /&gt;
|| Right-click again on the line to view the context menu.&lt;br /&gt;
&lt;br /&gt;
Now, click on the '''Line''' option.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Line tab'''&lt;br /&gt;
&lt;br /&gt;
Point to the fields under '''Arrow Styles'''&lt;br /&gt;
|| In the '''Line '''dialog box, click on the '''Line''' tab. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, under the '''Arrow Styles''' section we can see various fields.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the two drop-down boxes.&lt;br /&gt;
&lt;br /&gt;
'''Start style''' and '''End style'''.&lt;br /&gt;
|| Look at the '''Start''' '''Style''' and '''End''' '''Style''' fields.&lt;br /&gt;
&lt;br /&gt;
These are the '''arrow styles''' for each end of the line.&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight both '''Start''' '''Style''' and '''End''' '''Style''' &lt;br /&gt;
|| Both show the default '''style''' as '''none.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Start''' '''Style''' drop down and select “'''Arrow'''”.&lt;br /&gt;
|| Click on the '''Start''' '''Style''' drop-down and select '''Arrow'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the preview box&lt;br /&gt;
|| Immediately the '''preview box''' shows our selection.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the '''End style''' drop down box.&lt;br /&gt;
|| Leave the '''End''' '''style''' drop-down box as it is.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''OK '''button.&lt;br /&gt;
&lt;br /&gt;
Click anywhere on the page.&lt;br /&gt;
|| Click on the '''OK''' button at the bottom right.&lt;br /&gt;
&lt;br /&gt;
Now, click anywhere on the page to see the arrow''' '''clearly. &lt;br /&gt;
|- &lt;br /&gt;
|| Point to the arrowhead at the top end of the '''line'''.&lt;br /&gt;
|| An arrow has been drawn, with an arrowhead at the top end of the line.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to Arrows icon and expand the drop-down to show the shapes&lt;br /&gt;
|| Arrows''' '''can also be added from the '''Drawing toolbar '''on the left'''. '''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Shapes '''&amp;gt;&amp;gt; '''Line Starts with Arrows'''&lt;br /&gt;
|| Next, in the '''Shapes deck, '''under '''Lines and Arrows,''' select '''Line Starts with Arrow.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Move the cursor to the '''Draw''' page.&lt;br /&gt;
&lt;br /&gt;
Hold the left button of the '''mouse '''and drag from up to down.&lt;br /&gt;
|| Move the cursor to the '''Draw page'''.&lt;br /&gt;
&lt;br /&gt;
Hold the left mouse button and drag from the top to bottom, as shown.&lt;br /&gt;
&lt;br /&gt;
Release the mouse button to complete the line.&lt;br /&gt;
|- &lt;br /&gt;
|| Add one more '''arrow''' in the same manner.&lt;br /&gt;
|| Let us add one more arrow in the same manner.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + S''' keys &lt;br /&gt;
|| Press '''Ctrl + S''' keys to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Assignment'''&lt;br /&gt;
|| As an assignment&lt;br /&gt;
&lt;br /&gt;
* In your file “'''MyPractice'''”, draw a line.&lt;br /&gt;
* Select '''Line''' and open the '''Line''' dialog box.&lt;br /&gt;
* Under the '''Line''' '''Properties''' field, change '''style''', '''color''', '''width''' and '''transparency''' for '''lines'''.&lt;br /&gt;
* Under the '''Arrow''' '''Styles''' field, change the arrow '''style '''as per your preference. &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Cursor on the page.&lt;br /&gt;
|| Next, we’ll draw a star.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Shapes ''' &amp;gt;&amp;gt; '''5-point star'''.&lt;br /&gt;
|| In the '''Shapes deck, '''scroll down to the bottom.&lt;br /&gt;
&lt;br /&gt;
Under '''Stars,''' select '''5-point star.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Place the '''cursor '''next to the '''cloud'''.&lt;br /&gt;
&lt;br /&gt;
Hold the left mouse button&amp;gt;&amp;gt; drag to the left to draw a star&lt;br /&gt;
&lt;br /&gt;
Point to the star&lt;br /&gt;
|| Now place the cursor next to the cloud.&lt;br /&gt;
&lt;br /&gt;
Hold the left mouse''' '''button and drag to draw the star.&lt;br /&gt;
&lt;br /&gt;
Release the mouse''' '''button to complete the star.&lt;br /&gt;
|- &lt;br /&gt;
|| Click anywhere on the '''workspace'''&lt;br /&gt;
&lt;br /&gt;
Click on the''' x''' mark at the top right&lt;br /&gt;
|| Click anywhere on the '''workspace''' to deselect the star.&lt;br /&gt;
&lt;br /&gt;
Now close the '''Shapes deck''' by clicking on the''' '''cross('''x)''' mark at the top right. &lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Next let us learn how to move and delete '''objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the triangle by pressing the left mouse button &amp;gt;&amp;gt; drag it to the top of the rectangle.&lt;br /&gt;
&lt;br /&gt;
Let go of the mouse button.&lt;br /&gt;
|| To move an '''object''', just select and drag it with the mouse to the desired location.&lt;br /&gt;
&lt;br /&gt;
Then release the mouse''' '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''triangle''' &amp;gt;&amp;gt; press the '''Up arrow key''' 4 times''' '''and '''Left arrow '''2 times.&lt;br /&gt;
|| We can also use the '''up''', '''down''' and '''side''' '''arrow''' '''keys''' on the keyboard to move an '''object'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''star''' &amp;gt;&amp;gt; press '''Delete''' '''key''' &lt;br /&gt;
|| To delete an '''object''', just select it and then press the '''Delete key''' on the '''keyboard'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + S''' keys &lt;br /&gt;
|| Press '''Ctrl + S''' keys to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Ruler and Align Toolbar'''&lt;br /&gt;
|| Next, we’ll learn about the '''Rulers''' and '''Align''' '''toolbar'''.&lt;br /&gt;
&lt;br /&gt;
* '''Rulers''' are used to set up '''page''' '''margins''', and modify the '''units '''of''' measurement.'''&lt;br /&gt;
* The '''Align''' '''toolbar''' is used to position the '''objects'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to '''Water Cycle.odg'''&lt;br /&gt;
&lt;br /&gt;
Point to the '''rulers''' at the top and left hand side of the page.&lt;br /&gt;
|| Let us switch back to the drawing '''page'''.&lt;br /&gt;
&lt;br /&gt;
'''Rulers''' are displayed at the''' '''top and left side of the '''Draw workspace'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Right-click on the '''ruler''' on the '''top''' &amp;gt;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Point to the list of '''measurement''' '''units'''.&lt;br /&gt;
|| Let’s set the '''measurement''' '''units''' for a particular '''ruler'''.&lt;br /&gt;
&lt;br /&gt;
Right-click on the top '''Ruler.'''&lt;br /&gt;
&lt;br /&gt;
We can see a list of '''measurement units. '''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''centimeter'''&lt;br /&gt;
&lt;br /&gt;
Click on the unit “'''Inch'''”.&lt;br /&gt;
&lt;br /&gt;
Point to '''top''' '''ruler'''&lt;br /&gt;
|| By default '''centimeter''' is selected as the '''unit '''of''' measurement.''' &lt;br /&gt;
&lt;br /&gt;
Click on the '''Inch''' option.&lt;br /&gt;
&lt;br /&gt;
The '''measurement''' '''unit''' for the top '''ruler''' is now set to '''inches'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Right-click on the '''Ruler '''on the left &amp;gt;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click on the unit “'''Inch'''”.&lt;br /&gt;
&lt;br /&gt;
Point to both the '''rulers'''.&lt;br /&gt;
|| Similarly, let us set the measurement for the '''ruler '''on the left to''' Inch, '''also'''. '''&lt;br /&gt;
&lt;br /&gt;
'''Objects '''are drawn to '''scale''' only when '''units '''of''' measurement''' for both '''rulers''' are same.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the white part of both the '''rulers'''.&lt;br /&gt;
|| Notice that the active''' ruler''' is shown in white color.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to the end of the '''rulers''' on the top and the left.&lt;br /&gt;
|| Ends of the '''ruler''' represent '''page margin '''values that are set in “'''Page''' '''Setup'''”.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to rulers.&lt;br /&gt;
|| Let us see how the '''Rulers '''display the measurements of '''objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''cloud'''.&lt;br /&gt;
&lt;br /&gt;
Point to the '''start '''and the '''end '''of the small black lines on the '''ruler'''.&lt;br /&gt;
|| Select the '''cloud'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Two small '''start '''and '''end '''markers on both the '''rulers '''define the '''edges '''of the '''cloud'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Move the '''left top''' '''marker '''upwards.&lt;br /&gt;
|| If we move these '''markers '''on the '''ruler''', the size of the '''object''' changes accordingly.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Ruler'''&lt;br /&gt;
|| &lt;br /&gt;
* '''Rulers '''show the size of an '''object '''on the page&lt;br /&gt;
* They also enable us to position an '''object '''on the '''page '''and &lt;br /&gt;
* Display '''page boundaries'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Align toolbar'''&lt;br /&gt;
|| Let us move on to the '''Align toolbar '''now.&lt;br /&gt;
&lt;br /&gt;
* '''Align Objects toolbar''' helps to align the selected '''object. '''&lt;br /&gt;
* It aligns the object to the '''left''', '''right''', '''top''', '''bottom, center '''and''' centered '''positions.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Go to the View''' '''menu and select '''Toolbars'''.&lt;br /&gt;
&lt;br /&gt;
From the sub-menu select''' Align Objects'''.&lt;br /&gt;
&lt;br /&gt;
|| Let us enable the '''Align Objects''' toolbar.&lt;br /&gt;
&lt;br /&gt;
To do so go to the '''View '''menu and select '''Toolbars'''.&lt;br /&gt;
&lt;br /&gt;
From the sub-menu select '''Align Objects'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Let us now see how an '''object '''is aligned when we use different '''Align '''options.&lt;br /&gt;
|- &lt;br /&gt;
|| Select the cloud''' '''in the '''Draw page.'''&lt;br /&gt;
&lt;br /&gt;
Go to the''' Align toolba'''r &amp;gt;&amp;gt; Select '''Left'''.&lt;br /&gt;
&lt;br /&gt;
Point to show that the cloud is aligned to the left.&lt;br /&gt;
|| Make sure that the cloud is selected.&lt;br /&gt;
&lt;br /&gt;
On the '''Align toolbar '''window, click the icon named '''Left. '''&lt;br /&gt;
&lt;br /&gt;
The cloud is aligned to the left of the page.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to the Align''' toolbar''' &amp;gt;&amp;gt; Point to the '''Centered '''and '''Centre '''options.&lt;br /&gt;
|| Let us now understand the difference between the options '''Centered '''and '''Center.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Select the '''sun'''.&lt;br /&gt;
&lt;br /&gt;
Go to the '''Align toolbar''' &amp;gt;&amp;gt; Click on the '''Center '''icon&lt;br /&gt;
&lt;br /&gt;
Point to show that the '''sun '''&lt;br /&gt;
&lt;br /&gt;
Point to the '''top '''and '''bottom '''margins of the '''page'''.&lt;br /&gt;
|| Let’s select the sun '''object.'''&lt;br /&gt;
&lt;br /&gt;
Now, in the '''Align toolbar''', click on the '''Center '''icon.&lt;br /&gt;
&lt;br /&gt;
The sun '''object''' is aligned to the horizontal centre''' '''position on the '''page'''.&lt;br /&gt;
&lt;br /&gt;
That means the object is centred exactly between the top and bottom margins of the '''page'''.&lt;br /&gt;
&lt;br /&gt;
It does not move the '''object '''with respect to the page-width.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to the Align toolbar &amp;gt;&amp;gt; Click on the '''Centered '''icon.&lt;br /&gt;
&lt;br /&gt;
Point to show that the sun''' '''is aligned to the centre''' '''of the '''page'''.&lt;br /&gt;
&lt;br /&gt;
Drag the '''cursor '''across the '''page-width'''.&lt;br /&gt;
|| Now, from the '''Align toolbar''', let us select the '''Centered '''icon.&lt;br /&gt;
&lt;br /&gt;
The sun '''object''' is now aligned''' '''to the vertical centre''' '''position on the '''page'''.&lt;br /&gt;
&lt;br /&gt;
It moves the '''object '''with respect to the '''page-width '''of the''' page'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Point to the sun&lt;br /&gt;
|| Since we selected both options, the sun '''object''' is now exactly in the middle of the '''page'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Move the '''objects '''&lt;br /&gt;
|| Now, let’s move the '''objects '''to their correct positions as per our sample drawing.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + S''' keys &amp;gt;&amp;gt; close the file&lt;br /&gt;
|| Save and close the file. &lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| This brings us to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
Let us summarize.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Summary'''&lt;br /&gt;
|| In this tutorial we learnt how to:&lt;br /&gt;
&lt;br /&gt;
* Draw some more basic shapes such as '''lines''', '''arrows''', '''rectangles '''and '''stars'''&lt;br /&gt;
* Use the '''Shapes deck''' options for drawing '''objects'''&lt;br /&gt;
* Select, move and delete''' '''an '''object'''&lt;br /&gt;
* Use the '''Rulers '''&lt;br /&gt;
* Change the size of an''' object '''with the '''Rulers '''and &lt;br /&gt;
* Use the '''Align toolbar '''to position '''objects '''on the '''page'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Assignment'''&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
&lt;br /&gt;
* Open '''MyPractice.odg''' file&lt;br /&gt;
* Add''' '''a page&lt;br /&gt;
* Draw these two objects.&lt;br /&gt;
* Move them using the '''arrow keys'''.&lt;br /&gt;
* Select''' '''any '''object''' you have drawn and delete''' '''it.&lt;br /&gt;
* Use the '''Rulers '''to measure the size of the '''object'''.&lt;br /&gt;
* Then use the '''Align toolbar '''and align the '''objects '''to the''' '''centre''' '''of the '''page'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''About Spoken Tutorial Project'''&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Spoken tutorial workshops'''&lt;br /&gt;
||&lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please contact us.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Forums'''&lt;br /&gt;
|| Please post your timed queries in this forum.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Acknowledgement'''&lt;br /&gt;
|| Spoken Tutorial project is funded by Ministry of Education (MoE), Govt. of India&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''': '''Thank you'''&lt;br /&gt;
|| This tutorial was originally contributed by DesiCrew Solutions Pvt. Ltd. in 2011&lt;br /&gt;
&lt;br /&gt;
The script for this tutorial was written by Nikita Misal from IIT Bombay.&lt;br /&gt;
&lt;br /&gt;
And this is Madhuri Ganapathi along with the Spoken Tutorial team signing off.&lt;br /&gt;
&lt;br /&gt;
Thank you for watching.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/LaTeX/C3/Beamer-Themes-and-Animation-in-LaTeX/English</id>
		<title>LaTeX/C3/Beamer-Themes-and-Animation-in-LaTeX/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/LaTeX/C3/Beamer-Themes-and-Animation-in-LaTeX/English"/>
				<updated>2021-03-22T19:24:32Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C3/Closure-in-JS/English</id>
		<title>JavaScript/C3/Closure-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C3/Closure-in-JS/English"/>
				<updated>2021-02-03T13:59:46Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script:Closure&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, document, closure, function&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and Welcome to the spoken tutorial on “'''Closure in JS'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* '''Closures '''in''' JS'''&lt;br /&gt;
* And, their '''scope '''in''' function'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.51.1 ('''code editor''')&lt;br /&gt;
* '''Firefox''' web browser&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Closure&lt;br /&gt;
|| A '''closure '''is a '''function '''having access to the '''parent scope''', even after the '''parent function''' has closed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS'''&lt;br /&gt;
|| In the '''editor, '''browse and open the folder “'''Practice-JS''' ”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Click on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Explorer '''pane -&amp;gt; '''Practice-JS''' -&amp;gt; '''index.html'''&lt;br /&gt;
|| Under '''Practice-JS''' folder, open the file named '''index.html'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same is available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt;Closure&amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src = &amp;quot;main.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html '''file, update the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this code we have written a small '''HTML''' code and linked the''' JS file'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Alt + L and Alt + O &lt;br /&gt;
|| Start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show firefox&lt;br /&gt;
|| The default '''browser '''will open automatically and a new '''tab '''opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''developer tools'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Console''' tab&lt;br /&gt;
|| Now open the '''developer tools''' panel and go to the '''console tab''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Click on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Explorer '''pane -&amp;gt; '''Practice-JS''' -&amp;gt; '''main.js'''&lt;br /&gt;
|| Under '''Practice-JS''' folder, open the file named '''main.js'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const count = 1;&lt;br /&gt;
&lt;br /&gt;
function outer(x) {&lt;br /&gt;
&lt;br /&gt;
return function inner(y) {&lt;br /&gt;
&lt;br /&gt;
return x + y;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const outerReturnedValue = outer(4);&lt;br /&gt;
&lt;br /&gt;
const innerReturnedValue = outerReturnedValue(5);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.dir(outerReturnedValue);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(innerReturnedValue);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const sum = count + innerReturnedValue;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Sum is &amp;quot;, sum);&lt;br /&gt;
|| In the '''main.js '''file, update the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
const count = 1;&lt;br /&gt;
|| Here, I’m '''declaring''' a '''variable count '''and assigned it the value '''1''' which I’ll be using later.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function outer(x) {&lt;br /&gt;
&lt;br /&gt;
return function inner(y) {&lt;br /&gt;
&lt;br /&gt;
return x + y;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have '''declared''' a '''function outer '''which takes a '''variable x''' as a '''parameter.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It''' returns '''a''' function''' on its '''execution'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function inner(y) {&lt;br /&gt;
&lt;br /&gt;
return x + y;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
|| The '''returned function '''is named as '''inner.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It accepts''' y''' as '''parameter '''and '''returns, '''the value '''x + y'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const outerReturnedValue = outer(4);&lt;br /&gt;
|| Here, I try to '''execute '''the '''outer function '''by passing '''4''' to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And, '''catch '''the '''returned function inner''' in '''outerReturnedValue variable.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const innerReturnedValue = outerReturnedValue(5);&lt;br /&gt;
|| Here, I '''execute '''the '''outer returned function '''stored in '''outerReturnedValue variable.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I pass''' 5''' as a '''parameter '''to the '''outerReturnedValue. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On executing '''outerReturnedValue,''' technically the '''inner function '''will be '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This '''function returns''' a sum of '''x + y.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| The question here is what is the value of '''x'''?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As I’m passing only ‘'''y’''' here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.dir(outerReturnedValue);&lt;br /&gt;
|| Here, I’m '''logging''' '''outerReturnedValue '''to check if we have access to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''console.dir''' is very similar to '''console.log, '''but gives extra information.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(innerReturnedValue);&lt;br /&gt;
|| Here , I’m '''logging''' '''innerReturnedValue '''to check what is being '''returned'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const sum = count + innerReturnedValue;&lt;br /&gt;
|| Finally, add the '''count '''with the '''innerReturnedValue '''and store it in a '''sum variable'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Sum is &amp;quot;, sum);&lt;br /&gt;
|| And here we are '''logging sum'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
Observe the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
▶''' function inner(y)'''&lt;br /&gt;
|| Unfortunately, if you expand the right arrowhead symbol in '''Firefox,''' you cannot see the '''closure'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because the '''Closure '''node is hidden in '''Firefox developer tools'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Display Picture]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[https://drive.google.com/file/d/1P8i4CUYAjnDQw-nKhgTa60HERoBmUylm/view?usp=sharing https://drive.google.com/file/d/1P8i4CUYAjnDQw-nKhgTa60HERoBmUylm/view?usp=sharing]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| I have taken this screenshot from '''Chrome browser''', where you can see the highlighted text. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We still have access to the '''outer function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''closure '''is a '''function '''having access to the '''parent scope''', even after the''' parent function''' has closed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We still have access to the '''outer function''', even though its '''execution '''was completed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is called '''closure scope'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
9&lt;br /&gt;
|| So, here as we have access to '''x''' and '''y,''' the '''returned''' value is '''9'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Sum is 10'''&lt;br /&gt;
|| So finally, adding the '''count variable''', the sum is '''10'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* '''Closures '''in''' JS'''&lt;br /&gt;
* And, their '''scope '''in''' function'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment,&lt;br /&gt;
&lt;br /&gt;
* Open the file '''assignment.js'''&lt;br /&gt;
* Clear the existing code&lt;br /&gt;
* Create a '''function getData'''&lt;br /&gt;
* '''Declare''' a '''variable data '''using '''let keyword'''&lt;br /&gt;
* '''Return''' a '''display function '''accepting a '''variable '''as '''parameter '''&lt;br /&gt;
* '''Return''' the '''sum '''of '''data '''and '''variable'''&lt;br /&gt;
* '''Log''' the '''value '''in the '''console'''&lt;br /&gt;
* Open the file '''MyPage.html '''in a '''web browser'''.&lt;br /&gt;
* Observe the output in the '''browser’s console'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh.&lt;br /&gt;
&lt;br /&gt;
And this is Praveen from IIT Bombay signing off. &lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C3/Variable-Keywords-and-Hoisting-in-JS/English</id>
		<title>JavaScript/C3/Variable-Keywords-and-Hoisting-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C3/Variable-Keywords-and-Hoisting-in-JS/English"/>
				<updated>2021-02-03T13:39:11Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Variable Keywords and Hoisting&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, hoisting, var, let&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and Welcome to the spoken tutorial on “'''Variable Keywords, Scopes and Hoisting in JS'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* '''Variable Keywords '''&lt;br /&gt;
* '''Scopes''' and&lt;br /&gt;
* '''Hoisting'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.51.0 ('''code editor''')&lt;br /&gt;
* '''Firefox''' web browser&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| &lt;br /&gt;
* So, far we have learnt about '''keyword var '''and used it to '''declare variables'''.&lt;br /&gt;
* Now, we will learn 2 more '''keywords '''to '''declare variables '''and the advantages of using them.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Variable Keywords&lt;br /&gt;
|| &lt;br /&gt;
* '''let keyword''' is used for smaller '''scopes''' technically called '''block scope'''&lt;br /&gt;
* '''const keyword '''is used for '''declaring constants''' like '''Pi value'''&lt;br /&gt;
&lt;br /&gt;
(whose value would not change elsewhere in the program)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Scope&lt;br /&gt;
|| &lt;br /&gt;
* The '''scope '''of '''var keyword''' is '''functional scope''', that means,&lt;br /&gt;
* The '''variable declared''' inside a '''function '''using '''var''', cannot be accessed outside the '''function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Scope&lt;br /&gt;
|| &lt;br /&gt;
* To '''declare variables, ES6 '''has introduced two new '''keywords''':&lt;br /&gt;
** '''let''' and&lt;br /&gt;
** '''const''' &lt;br /&gt;
* They both have '''block scope'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Scope&lt;br /&gt;
|| &lt;br /&gt;
* A '''variable declared''' with '''let '''or '''const''' inside a '''loop''', '''if/else condition''' or '''switch case'''&lt;br /&gt;
* Cannot be accessed outside the '''block scope'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us take an example and understand these better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS'''&lt;br /&gt;
|| In the '''editor, '''browse and open the folder “'''Practice-JS''' ”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Click on &lt;br /&gt;
&lt;br /&gt;
'''Explorer '''pane -&amp;gt; '''Practice-JS''' -&amp;gt; '''index.html'''&lt;br /&gt;
|| Under '''Practice-JS''' folder, open the file named '''index.html'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same is available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt; Variable Keywords and Hoisting &amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src = &amp;quot;main.js&amp;quot; &amp;gt; &amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html '''file, update the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this code we have written a small '''HTML''' code and linked the''' JS file'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Alt + L and Alt + O &lt;br /&gt;
|| Start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show firefox&lt;br /&gt;
|| The default '''browser '''will open automatically and a new '''tab '''opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''developer tools'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Console''' tab&lt;br /&gt;
|| Now open the '''Browser developer tools''' panel and go to the '''console tab''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Click on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Explorer '''pane -&amp;gt; '''Practice-JS''' -&amp;gt; '''main.js'''&lt;br /&gt;
|| Under '''Practice-JS''' folder, open the file named '''main.js'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display() {&lt;br /&gt;
&lt;br /&gt;
var a = 10;&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Inside Function: &amp;quot;, a);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display();&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
let b = 30;&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Inside block: &amp;quot;, b);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Outside Function: &amp;quot;, a);&lt;br /&gt;
|| In the '''main.js '''file, update the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display() {&lt;br /&gt;
&lt;br /&gt;
var a = 10;&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Inside Function: &amp;quot;, a);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have '''declared''' a '''function '''named '''display.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Inside the '''function''', I have '''declared''' a '''variable '''using '''var keyword''' and assigned 10 as a value to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To verify this, I’m using a '''log statement''' to display the text value - ‘'''Inside Function’.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display();&lt;br /&gt;
|| Here, I’m making a '''function call '''to '''execute '''the '''declared function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
let b = 30;&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Inside block: &amp;quot;, b);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, I have created a '''block.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Anything you write between braces, technically, is a '''block.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, I have '''declared variable b '''using '''let keyword.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To verify this, I’m using a '''log statement''' to display the text value - '''‘Inside block’.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Outside Function: &amp;quot;, a);&lt;br /&gt;
|| Here, I’m using a '''log statement''' to display the value '''‘a’''' outside the '''function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is to verify whether we can access the value outside the '''function '''or not.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Inside Function: 10'''&lt;br /&gt;
|| As expected, when I make a '''function call, '''the value 10 gets '''logged'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Inside block: 30'''&lt;br /&gt;
|| Similarly the '''block '''also gets '''executed''' after the''' function call.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It displays 30, because of the '''log statement''' written inside the '''block'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Uncaught ReferenceError: a is not defined'''&lt;br /&gt;
|| Now, as we are trying to display the value of ‘'''a’''' outside the '''function, '''we got an '''error'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''console''' displays, '''Uncaught ReferenceError: a is not defined'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By this we conclude that the '''variable '''which is '''declared''' using '''var '''has a '''functional scope.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Outside block: &amp;quot;, b);&lt;br /&gt;
|| In the '''main.js '''file, replace the last '''console log statement''' with the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, we’ll test whether the '''variable declared''' inside the '''block '''is available outside or not.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Uncaught ReferenceError: b is not defined'''&lt;br /&gt;
|| Now, we get an '''error '''for the '''outside block log statement'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Uncaught ReferenceError: b is not defined'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By this we conclude that the '''variable declared''' inside the '''block '''is not accessible outside.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hence the '''keyword let '''has '''block scope'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now lets learn about the '''const keyword'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const pi = 3.14;&lt;br /&gt;
&lt;br /&gt;
pi = 3.141592;&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const pi = 3.14;&lt;br /&gt;
|| Here, I have '''declared''' a '''variable pi '''and assigned '''3.14''' to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that the '''data type''' here is '''primitive '''('''number''').&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
pi = 3.141592;&lt;br /&gt;
|| Here, I’m trying to reassign the '''variable pi''' to '''3.141592.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Uncaught TypeError: invalid assignment to const 'pi''''&lt;br /&gt;
|| Notice we get an error- '''“Uncaught TypeError: invalid assignment to const 'pi' “.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hence, we conclude that the value for a '''const variable''' cannot be changed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Note again, we have tested only for '''primitive data type.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let's check for '''non-primitive data types.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const student = {&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Jayesh&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
student.name = &amp;quot;Praveen&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(student);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
const student = {&lt;br /&gt;
&lt;br /&gt;
name: &amp;quot;Jayesh&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
|| Here, I have '''declared''' a '''variable '''with the name '''student.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then I have assigned an '''object '''('''non -primitive data type''') to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''object '''contains a '''property name''' with the value '''jayesh.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
student.name = &amp;quot;Praveen&amp;quot;;&lt;br /&gt;
|| Now here, I try to change the '''property '''value from '''jayesh '''to '''praveen'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(student);&lt;br /&gt;
|| To verify what happens, I’m '''logging''' the ‘'''student’ variable'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Object { name: &amp;quot;Praveen&amp;quot; }'''&lt;br /&gt;
|| Notice here, we have the value of '''name property '''changed from '''jayesh '''to '''praveen'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| By this we conclude that for '''non-primitive data types const '''acts differently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It does not modify the '''object data type. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can add '''properties '''and change the '''property '''values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similarly for '''arrays''', we can add and remove values in an '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Lexical Scope&lt;br /&gt;
|| In '''JavaScript''', &lt;br /&gt;
&lt;br /&gt;
* '''Variables '''which are '''declared''' outside the '''function '''or a '''block '''&lt;br /&gt;
* are available inside the '''function '''or a '''block'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
let a = 10;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Value of a is &amp;quot;, a);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display();&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: let a = 10;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, I have '''declared''' a '''variable ‘a’''' with '''let keyword''' and assigned 10 to it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display() {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;Value of a is &amp;quot;, a);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Then, I have created a '''function '''display and I’m trying to '''log''' the value of '''a.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display();&lt;br /&gt;
|| Here, I make a '''function call '''to '''execute''' the '''function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Value of a is 10'''&lt;br /&gt;
|| The value '''a''' which is declared outside the '''function '''is available inside the '''function '''too. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That's the reason '''10''' is displayed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This mechanism is called the '''lexical scope '''in''' JS.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let’s go to the next topic.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Hoisting&lt;br /&gt;
|| '''Hoisting '''is '''JavaScript’s''' default behavior of moving '''declarations''' to the top of the '''Scope '''before '''execution'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;The value of a is &amp;quot;, a);&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;The value of b is &amp;quot;, b);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var a = 10;&lt;br /&gt;
&lt;br /&gt;
let b = 20;&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;The value of a is &amp;quot;, a);&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;The value of b is &amp;quot;, b);&lt;br /&gt;
|| Here, I’m trying to '''log '''the '''a''' and''' b''' values which are not '''declared''' yet.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var a = 10;&lt;br /&gt;
|| Below the '''log statements''', I have declared a '''variable''' ‘'''a’ '''using the '''var keyword''' and assigned '''10''' to it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let b = 20;&lt;br /&gt;
|| Here, I have '''declared''' a '''variable ‘b’''' using the '''let keyword '''and assigned '''20''' to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let’s see what happens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]: Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The value of a is undefined'''&lt;br /&gt;
|| Notice here, we got the value of '''a''' as '''undefined'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because '''variables declared''' using '''var keyword''' is '''hoisted'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''declarations''' will be pushed to the top of the '''scope'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And, the value is '''undefined '''because it’s a default value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Uncaught ReferenceError: can't access lexical declaration 'b' before initialization'''&lt;br /&gt;
|| '''Uncaught ReferenceError: can't access lexical declaration 'b' before initialization'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This happens for '''b '''because '''hoisting '''does not happen for '''let '''and '''const.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only after '''declaration''', the values can be used. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| So we conclude that '''hoisting''' happens for '''variables declared''' with '''var''', and not for''' let''' and''' const.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Even '''functions '''can be '''hoisted'''.&lt;br /&gt;
&lt;br /&gt;
That is the reason we can '''execute''' a '''function '''before '''declaration'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* '''Variable Keywords'''&lt;br /&gt;
* '''Scopes '''and&lt;br /&gt;
* '''Hoisting''' in '''JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment,&lt;br /&gt;
&lt;br /&gt;
* Open the file '''assignment.js'''&lt;br /&gt;
* Clear the existing code&lt;br /&gt;
* '''Log''' the value '''x''' in '''console''' first before '''declaring x''' value&lt;br /&gt;
* '''Declare''' a '''variable x''' using '''const below '''the '''log statement'''&lt;br /&gt;
* Open the file '''MyPage.html '''in a '''web browser'''.&lt;br /&gt;
* Observe the output in the '''browser’s console'''&lt;br /&gt;
* An '''error '''is observed&lt;br /&gt;
* Reason: Recall that the '''variables declared''' with '''const '''will not be '''hoisted'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh.&lt;br /&gt;
&lt;br /&gt;
And this is Praveen from IIT Bombay signing off. &lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C3/Window-and-DOM-Manipulations-in-JS/English</id>
		<title>JavaScript/C3/Window-and-DOM-Manipulations-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C3/Window-and-DOM-Manipulations-in-JS/English"/>
				<updated>2021-02-03T12:52:41Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script:Window and DOM Manipulations&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, document, window&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and Welcome to the spoken tutorial on “'''Window and DOM Manipulations'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about the:&lt;br /&gt;
* '''Window Object '''&lt;br /&gt;
* '''Document '''and '''DOM manipulations '''in''' JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.51.1 ('''code editor''')&lt;br /&gt;
* '''Firefox''' web browser&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files.&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: DOM&lt;br /&gt;
|| &lt;br /&gt;
* The expansion of '''DOM''' is '''Document Object Model'''&lt;br /&gt;
* Each and every '''tab '''in a '''browser '''is a '''document'''.&lt;br /&gt;
* A''' document '''is an '''object'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: DOM&lt;br /&gt;
|| &lt;br /&gt;
* All the '''HTML''' '''elements''' declared inside an '''HTML '''page is a part of the '''document object'''.&lt;br /&gt;
* The '''DOM '''represents the '''document '''with a '''logical tree''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: DOM&lt;br /&gt;
|| &lt;br /&gt;
* '''getElementById '''is a '''function '''in the '''document object'''.&lt;br /&gt;
* The '''function '''takes the '''HTML element ID '''as a '''parameter '''and &lt;br /&gt;
* '''Returns''' the '''element '''with the '''ID '''in the '''document'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: DOM&lt;br /&gt;
|| &lt;br /&gt;
* '''innerText '''and''' innerHTML '''are '''properties '''for the '''element '''in the '''DOM'''&lt;br /&gt;
* '''innerText returns''' the text value for the '''element'''&lt;br /&gt;
* '''innerHTML returns''' the '''HTML element value''' for the '''element'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: DOM&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://developer.mozilla.org/en-US/docs/Web/API/Document&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| There are lots of '''functions''' and '''properties''' in the '''document''' '''object'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''getElementById '''is just one example which I’m demonstrating in this tutorial.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To know more about the '''document object''', visit this link.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show VS editor&lt;br /&gt;
|| Open '''Visual Studio Code editor'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Welcome Page -&amp;gt; Open Folder -&amp;gt; '''Practice-JS'''&lt;br /&gt;
|| In the '''editor, '''browse and open the folder “'''Practice-JS''' ”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Click on &lt;br /&gt;
&lt;br /&gt;
'''Explorer '''pane -&amp;gt; '''Practice-JS''' -&amp;gt; '''index.html'''&lt;br /&gt;
|| Under '''Practice-JS''' folder, open the file named '''index.html'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same is available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt;Window and DOM Manipulations&amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;h1 id=&amp;quot;heading1&amp;quot;&amp;gt; Hello! &amp;lt;/h1&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;ul id=&amp;quot;unorderedList&amp;quot;&amp;gt; &amp;lt;/ul&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;main.js&amp;quot;&amp;gt; &amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this code we have written a small '''HTML''' code and linked the''' JS file'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;h1 id=&amp;quot;heading1&amp;quot;&amp;gt; Hello! &amp;lt;/h1&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, I have created a simple '''h1 element '''with id '''heading1.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;ul id=&amp;quot;unorderedList&amp;quot;&amp;gt; &amp;lt;/ul&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, I have created an '''unordered list element '''with '''id unorderedList.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We’ll use these '''elements''' while working with '''JS.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Alt + L and Alt + O &lt;br /&gt;
|| Start the '''Live server'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show firefox&lt;br /&gt;
|| The default '''browser '''will open automatically and a new '''tab '''opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''developer tools'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Console''' tab&lt;br /&gt;
|| Now open the '''Browser developer tools''' panel and go to the '''console tab''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Click on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Explorer '''pane -&amp;gt; '''Practice-JS''' -&amp;gt; '''main.js'''&lt;br /&gt;
|| Under '''Practice-JS''' folder, open the file named '''main.js'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(document);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor]Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(document);&lt;br /&gt;
|| Here, we '''log''' the '''document keyword.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''document '''is an '''object '''as discussed earlier in the slide.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s see what the '''object '''contains.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''HTML Document'''&lt;br /&gt;
|| We can see '''HTML Document''' displayed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click: ▶ HTML document&lt;br /&gt;
|| Expand the '''HTML document''' by clicking on the right arrowhead symbol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| We can see all the '''properties '''in the '''HTML object'''.&lt;br /&gt;
&lt;br /&gt;
For e.g. '''doctype''', '''documentElement '''etc.,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scroll to the end of the '''object, '''and we can see '''&amp;lt;nowiki&amp;gt;&amp;lt;prototype&amp;gt;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
▶''' '''&amp;lt;nowiki&amp;gt;&amp;lt;prototype&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Expand the '''&amp;lt;nowiki&amp;gt;&amp;lt;prototype&amp;gt;&amp;lt;/nowiki&amp;gt;''' by clicking on the right arrowhead symbol.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| We can see '''getElementsByTagName, getElementsByClassName functions''' in the '''prototype''' '''object'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let's use '''getElementById '''and see how it works.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(document.getElementById(&amp;quot;heading1&amp;quot;));&lt;br /&gt;
|| Replace the code as shown in the '''main.js''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(document.getElementById(&amp;quot;heading1&amp;quot;));&lt;br /&gt;
|| Here, we are using '''getElementById function '''and passing the '''heading1 ID '''as the '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Browser&lt;br /&gt;
|| Switch back to '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;h1 id=&amp;quot;heading1&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, we can see that the '''function '''has '''returned''' the '''HTML element''' with '''heading1 '''as '''ID.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click: ▶''' '''&amp;lt;nowiki&amp;gt;&amp;lt;h1 id=&amp;quot;heading1&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Expand the '''h1 element''' by clicking on the right arrowhead symbol.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Highlight]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
h1#heading1&lt;br /&gt;
&lt;br /&gt;
​accessKey: &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
accessKeyLabel: &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
​align: &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
​assignedSlot: null&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;​attributes: NamedNodeMap [ id=&amp;quot;heading1&amp;quot; ]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
​baseURI: &amp;quot;about:newtab&amp;quot;&lt;br /&gt;
&lt;br /&gt;
.. .. . . . . . .&lt;br /&gt;
|| If you have noticed this, even '''h1 element''' is an '''object '''with '''properties. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All the''' HTML elements''' have the same '''properties'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If we scroll down, we can see '''id property.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
id=&amp;quot;heading1&amp;quot;&lt;br /&gt;
|| The''' id property''' is having '''heading1 '''as value, which we have declared in the '''HTML''' file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just below '''id''' we have '''innerHTML '''and '''innerText '''properties which have '''‘Hello!’''' value assigned.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s try to modify the text value to '''h1 element.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;heading1&amp;quot;).innerText = &amp;quot;Spoken Tutorials&amp;quot;;&lt;br /&gt;
|| Replace the code as shown in the '''main.js''' file&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
document.getElementById(&amp;quot;heading1&amp;quot;).innerText = &amp;quot;Spoken Tutorials&amp;quot;;&lt;br /&gt;
|| We know that, '''document.getElementById(&amp;quot;heading1&amp;quot;) returns''' a '''h1 element'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And, this '''element''' has an '''innerText '''property.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To that '''property''' we are assigning &amp;quot;'''Spoken Tutorials'''&amp;quot; as '''value '''using the '''assignment''' '''operator.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Browser&lt;br /&gt;
|| Switch back to '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Page] [Highlight];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorials'''&lt;br /&gt;
|| We have successfully assigned a value to the '''h1 element''' having '''id heading1.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hence''', Spoken Tutorials''' is displayed in the '''innerText '''and '''innerHTML properties '''of '''h1 tag'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;document.getElementById(&amp;quot;unorderedList&amp;quot;).innerHTML = &amp;quot;&amp;lt;li&amp;gt;Spoken Tutorial&amp;lt;/li&amp;gt;&amp;quot;;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Replace the code as shown in the '''main.js''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;document.getElementById(&amp;quot;unorderedList&amp;quot;).innerHTML = &amp;quot;&amp;lt;li&amp;gt; Spoken Tutorial &amp;lt;/li&amp;gt;&amp;quot;;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, we are getting the '''ul element''' declared in '''HTML file '''using '''document.getElementById(&amp;quot;unorderedList&amp;quot;)'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As mentioned before, all the '''elements '''have similar properties''' '''as previously shown for''' h1.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''ul''' '''element''' also has a property called '''innerHTML '''and we are assigning a '''HTML list item''' to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As we know in '''HTML''', the children for '''ul tag''' are '''li tags.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Browser&lt;br /&gt;
|| Switch back to '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Page] [Highlight];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial'''&lt;br /&gt;
|| We have successfully assigned a value to the '''ul element''' having '''id unorderedList'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hence''', Spoken Tutorials''' is displayed as an '''unordered list item.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt about:&lt;br /&gt;
* '''Window Object'''&lt;br /&gt;
* '''Document '''and''' DOM Manipulations '''in''' JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment,&lt;br /&gt;
&lt;br /&gt;
* Open the file '''MyPage.html'''&lt;br /&gt;
* Clear the existing code&lt;br /&gt;
* Add a '''h1 tag''' with '''id''' as '''heading1 '''for the text “'''HTML is Loaded!”'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| &lt;br /&gt;
* Open the file '''assignment.js'''&lt;br /&gt;
* Clear the existing code&lt;br /&gt;
* Access the '''h1''' element using '''id '''&lt;br /&gt;
* Modify the text as - '''Both HTML and JS are Loaded!'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| &lt;br /&gt;
* Open the file '''MyPage.html '''in a '''web''' '''browser'''.&lt;br /&gt;
* Observe the output in the '''browser'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh.&lt;br /&gt;
&lt;br /&gt;
And this is Praveen from IIT Bombay signing off. &lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C2/Functions-in-JS/English</id>
		<title>JavaScript/C2/Functions-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C2/Functions-in-JS/English"/>
				<updated>2021-02-03T05:51:46Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script:Functions&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, Function, value, arguments, parameters&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and Welcome to the spoken tutorial on “'''Functions in JS'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* '''Functions'''&lt;br /&gt;
* Different '''types''' of '''functions''' and &lt;br /&gt;
* '''Function declarations''' in '''JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.51.1 ('''code editor''')&lt;br /&gt;
* '''Firefox''' web browser&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Functions&lt;br /&gt;
|| &lt;br /&gt;
* A '''function '''is a '''block''' of '''code''' which is defined once and can be called multiple times.&lt;br /&gt;
* The main advantage of a '''function''' is reusability.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Types of Functions&lt;br /&gt;
|| The different types of '''functions '''are,&lt;br /&gt;
* '''Basic Function'''&lt;br /&gt;
* '''Parameterized Function'''&lt;br /&gt;
* '''Function as a value'''&lt;br /&gt;
* '''Function as an Argument/Parameter'''&lt;br /&gt;
* '''Function as Property'''&lt;br /&gt;
* '''Function Arguments'''&lt;br /&gt;
* '''Constructor Function'''&lt;br /&gt;
&lt;br /&gt;
Let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Visual Studio code editor'''&lt;br /&gt;
|| Switch to the '''Visual Studio code editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Welcome Page -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Folder -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Practice-JS'''&lt;br /&gt;
|| In the '''Welcome page, '''click on the '''Open folder link '''at the top left corner'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Browse and locate the folder “'''Practice-JS''' ”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK '''button at the top right corner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Click on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Explorer '''panel -&amp;gt; '''Practice-JS''' -&amp;gt; '''index.html'''&lt;br /&gt;
|| In the '''Explorer '''panel on the left, under '''Practice-JS''' click on the file named '''index.html'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt;Functions&amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;main.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, type the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this code we have written a small '''HTML''' code and linked the''' JS file'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Alt + L and Alt + O &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Now press the key combinations '''Alt + L''' and''' Alt + O.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Live server''' gets started.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show firefox&lt;br /&gt;
|| The default '''browser '''will open automatically and a new '''tab '''opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the '''Browser developer tools'''&lt;br /&gt;
|| Now press '''Ctrl + Shift + I''' keys together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Browser developer tools''' panel opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Click on the &amp;lt;/nowiki&amp;gt;'''Console''' tab&lt;br /&gt;
|| Now click on the '''console tab''' in the '''developer tools.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Click on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Explorer '''panel -&amp;gt; '''Practice-JS''' -&amp;gt; '''main.js'''&lt;br /&gt;
|| In the '''Explorer '''panel on the left, under '''Practice-JS''' click on the file named '''main.js'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function add() {&lt;br /&gt;
&lt;br /&gt;
console.log(1+2);&lt;br /&gt;
&lt;br /&gt;
return true;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
add();&lt;br /&gt;
&lt;br /&gt;
console.log(add());&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function add()&lt;br /&gt;
|| In '''JS''', to create a basic '''function''', we use the '''function keyword'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is followed by the name of the '''function '''and '''brackets.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(1+2);&lt;br /&gt;
|| Inside the '''function block''', we can have multiple instructions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here we just '''logged''' 1 + 2&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return true;&lt;br /&gt;
|| '''Functions '''always '''return '''some value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''return '''is an optional '''keyword'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you don’t use '''return keyword''' to '''return''' any value, by default '''undefined '''will be '''returned'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, this '''function '''is returning '''true.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
add();&lt;br /&gt;
||Only when the '''function '''is '''called''', the '''function block ''' will get '''executed.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''function call''' can be made any number of times.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(add());&lt;br /&gt;
|| Here, I have written the '''add() function''' inside the '''console log statement'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, whatever is being '''returned''' by the '''add() function''', will get '''logged'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''3'''&lt;br /&gt;
&lt;br /&gt;
'''true'''&lt;br /&gt;
|| Here in the output, we observe:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
true&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the '''console''', at the right end of the 3, we see (2).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This means 3 is printed twice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
add();&lt;br /&gt;
|| The first '''3''' is printed for the first '''function call'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log('''add()''');&lt;br /&gt;
|| The second '''3''' is printed for the second '''function call'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''console.log('''add()''');'''&lt;br /&gt;
|| And '''true '''is printed because '''add() function’s return value''' is '''logged.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function sub(a) {&lt;br /&gt;
&lt;br /&gt;
return a - 1;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var result &amp;lt;nowiki&amp;gt;= sub(6);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(result);&lt;br /&gt;
|| Next, let us learn about '''parameterized function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function sub(a) {&lt;br /&gt;
|| Here, we have created a '''function''' similar to the''' '''basic''' function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The only difference is we are '''passing''' a '''parameter a'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''parameter '''can be used for a purpose in the '''function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return a - 1;&lt;br /&gt;
|| Here, we are subtracting the value and '''returning''' the subtracted value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var result &amp;lt;nowiki&amp;gt;= sub(6);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In this line, the '''function call''' is made '''passing 6''' as the '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''returned''' value is stored in the '''result variable'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(result);&lt;br /&gt;
|| Here, we are '''logging''' the value on the '''console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''5'''&lt;br /&gt;
|| The output is '''5 '''because we have '''passed''' the number '''6''' as the '''parameter'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That value is being subtracted by 1 and '''returned'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After '''returning''', we are catching the value in a '''variable''' and '''logging''' it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var mul = function () {&lt;br /&gt;
&lt;br /&gt;
return true;&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var result = mul();&lt;br /&gt;
&lt;br /&gt;
console.log(result);&lt;br /&gt;
|| Next, let us learn about the '''function''' as a '''value'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var mul = function () &lt;br /&gt;
|| Here, we have declared a '''variable '''with the name '''mul.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''variable mul '''is assigned to a '''function '''using the '''function keyword'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We don’t have to give the name of the '''function '''again, followed by the '''function keyword'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The name of the''' function '''becomes''' mul''' here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function () &lt;br /&gt;
|| We call '''function ()''' as an '''anonymous function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If we wish to, we can even '''pass''' some '''parameters '''to this.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
return true;&lt;br /&gt;
|| This '''function '''just '''returns true'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var result = mul();&lt;br /&gt;
|| The '''function call '''is similar to the basic and''' parameterized '''ones.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''returned''' value would be caught by the '''result variable.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(result);&lt;br /&gt;
|| Here, we are '''logging''' the '''result variable'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''true'''&lt;br /&gt;
|| Here, as the '''function returns true, &amp;quot;True&amp;quot; '''is printed on the '''console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function d1() {&lt;br /&gt;
&lt;br /&gt;
console.log('Spoken');&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function d2() {&lt;br /&gt;
&lt;br /&gt;
console.log('Tutorials');&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function d3() {&lt;br /&gt;
&lt;br /&gt;
console.log('on JS');&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function display(fn, fn1, fn2) {&lt;br /&gt;
&lt;br /&gt;
fn();&lt;br /&gt;
&lt;br /&gt;
fn1();&lt;br /&gt;
&lt;br /&gt;
fn2();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display(d1, d2, d3);&lt;br /&gt;
|| Next, let us learn about '''function '''as a '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function d1() {&lt;br /&gt;
&lt;br /&gt;
console.log('Spoken');&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function d2() {&lt;br /&gt;
&lt;br /&gt;
console.log('Tutorials');&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function d3() {&lt;br /&gt;
&lt;br /&gt;
console.log('on JS');&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Here, we have '''declared''' three '''functions '''with names''' d1, d2 and d3''' respectively.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function display(fn, fn1, fn2)&lt;br /&gt;
|| Here, I have created another '''function '''named '''display.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To this, we are '''passing''' 3 '''parameters '''named '''fn, fn1 '''and''' fn2.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn();&lt;br /&gt;
&lt;br /&gt;
fn1();&lt;br /&gt;
&lt;br /&gt;
fn2();&lt;br /&gt;
|| Inside, the '''display function''',we’re making '''function calls''' for the '''parameters'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because the '''parameters''' are '''functions'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display(d1, d2, d3);&lt;br /&gt;
|| While making the '''display function call, '''we’re '''passing''' 3 '''functions d1, d2 '''and '''d3''' respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, as we’re '''passing d1,d2 '''and '''d3''', these '''functions''' would be called '''callback functions.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''callback function'''&lt;br /&gt;
|| '''Callback function''' is defined as a '''function''' which is '''passed''' as a '''parameter '''to another '''function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
display(d1, d2, d3);&lt;br /&gt;
|| '''d1, d2 '''and''' d3 '''will be taken as '''fn, fn1, fn2''' in '''display function '''as the '''parameters.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On making the '''function call''' for '''fn, fn1''' and''' fn2, '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''d1, d2 '''and''' d3 functions '''will be executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Spoken'''&lt;br /&gt;
&lt;br /&gt;
'''Tutorials'''&lt;br /&gt;
&lt;br /&gt;
'''on JS'''&lt;br /&gt;
|| Here, if we see the output '''Spoken Tutorials on JS '''is being '''logged''' from the '''d1, d2''' and '''d3 functions'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var student = {&lt;br /&gt;
&lt;br /&gt;
marks: function () {&lt;br /&gt;
&lt;br /&gt;
return 100;&lt;br /&gt;
&lt;br /&gt;
},&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var result = student.marks();&lt;br /&gt;
&lt;br /&gt;
console.log(result);&lt;br /&gt;
|| Next, let us learn about '''function '''as a '''property.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Highlight:&lt;br /&gt;
&lt;br /&gt;
var student = {};&lt;br /&gt;
|| Here, '''student '''is the '''object'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
marks: function () {&lt;br /&gt;
&lt;br /&gt;
return 100;&lt;br /&gt;
&lt;br /&gt;
},&lt;br /&gt;
|| Here, '''marks '''is a '''property''' in the '''student object''', which holds an '''anonymous function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
return 100;&lt;br /&gt;
|| This '''function returns''' 100.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var result = student.marks();&lt;br /&gt;
|| To make a '''function call''', we need to '''call''' the '''property '''inside the '''student object'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, we access the marks as '''student.marks'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To make a '''function call''' we add '''brackets '''similar to a '''function''' as a value&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, we have named the '''function '''as '''marks.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''returned''' value is stored in '''variable result. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| console.log(result);&lt;br /&gt;
|| Here, we are '''logging '''the '''result.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''100'''&lt;br /&gt;
|| Here, the output is 100 as the '''function returns''' 100.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function marks() {&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;for (var i = 0; i &amp;lt; arguments.length; i++) {&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;console.log(arguments[i]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
marks(87, 78, 90, 81);&lt;br /&gt;
|| Next, let us understand about '''function arguments.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
marks(87, 78, 90, 81);&lt;br /&gt;
|| So far, when we '''passed parameters '''to a '''function''', we '''declared''' a '''parameter variable '''while creating the '''function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This example helps us in a situation where we are not sure of the number of '''parameters''' to be '''passed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this case, we are '''passing''' 4 '''parameters'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function marks() {}&lt;br /&gt;
|| And we have not '''declared''' any '''variables '''to '''catch''' the values '''passed''' in the '''marks function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;for (var i = 0; i &amp;lt; arguments.length; i++) {&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Using the '''keyword arguments, '''we can access the '''parameters '''being '''passed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''arguments.length, '''will give the number of the '''arguments''' being '''passed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, we can '''loop''' over and get the values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note here that the '''prototype '''of the '''arguments''' is '''array '''but the '''data structure''' is '''object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;console.log(arguments[i]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, we are just '''logging''' the value in the '''arguments.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
'''87'''&lt;br /&gt;
&lt;br /&gt;
'''78'''&lt;br /&gt;
&lt;br /&gt;
'''90'''&lt;br /&gt;
&lt;br /&gt;
'''81'''&lt;br /&gt;
|| As we are '''passing 87, 78, 90, 81''' as '''parameters, '''the output we get is '''87, 78, 90, 81.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Student(stuName, stuAge) {&lt;br /&gt;
&lt;br /&gt;
this.name = stuName;&lt;br /&gt;
&lt;br /&gt;
this.age = stuAge;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var s1 = new Student(&amp;quot;S1&amp;quot;, 10);&lt;br /&gt;
&lt;br /&gt;
var s2 = new Student(&amp;quot;S2&amp;quot;, 11);&lt;br /&gt;
&lt;br /&gt;
console.log(s1);&lt;br /&gt;
&lt;br /&gt;
console.log(s2);&lt;br /&gt;
|| Next, let us understand the '''constructor function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Student(stuName, stuAge) &lt;br /&gt;
|| Here, we have created a '''function '''named '''Student '''and '''passing''' the '''parameters stuName '''and '''stuAge.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only in the '''constructor function''', the name of the '''function '''starts with an '''uppercase '''letter.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
this.name = stuName;&lt;br /&gt;
&lt;br /&gt;
this.age = stuAge;&lt;br /&gt;
|| Inside the '''function block''' we have assigned, '''this.name''' as '''stuName '''and '''this.age''' as '''stuAge'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, '''this '''refers to the '''variable '''name, where the '''function call '''is made.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var s1 = new Student(&amp;quot;S1&amp;quot;, 10);&lt;br /&gt;
&lt;br /&gt;
var s2 = new Student(&amp;quot;S2&amp;quot;, 11);&lt;br /&gt;
|| Here, we have made the''' function calls''',&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the '''constructor function, new keyword''' has to be used while making the '''function call'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the first''' function call''', the '''variable name '''is '''s1,''' so this refers to''' s1.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For the second''' function call''', the '''variable name '''is '''s2,''' so this refers to''' s2.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| The '''constructor function''' creates a '''new object''' with help of '''parameters '''and '''returns '''the '''object.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The returned '''object '''will be stored in the respective '''variable'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(s1);&lt;br /&gt;
&lt;br /&gt;
console.log(s2);&lt;br /&gt;
|| Here, we are '''logging s1 '''and '''s2'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Object { name: &amp;quot;S1&amp;quot;, age: 10 }'''&lt;br /&gt;
&lt;br /&gt;
'''Object { name: &amp;quot;S2&amp;quot;, age: 11 }'''&lt;br /&gt;
|| Here, we see we have 2 '''objects '''printed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One for '''s1''' and other for '''s2, '''with the '''property '''names as '''name '''and '''age '''as mentioned in '''function block.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And the values are '''stuName '''and '''stuAge '''which are '''passed''' as '''parameters'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Hence, we conclude that the '''constructor function returns''' an '''object.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
While making a '''function call, new keyword''' would be responsible for creating the '''new object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt about:&lt;br /&gt;
* '''Functions'''&lt;br /&gt;
* Different types of '''functions''' and &lt;br /&gt;
* '''Function declarations''' in '''JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
* Open the file '''assignment.js''' which you have created earlier&lt;br /&gt;
* Clear the existing code&lt;br /&gt;
* Create an '''Employee function'''&lt;br /&gt;
* '''Employee function '''accepts '''name '''and '''id '''as '''parameters'''&lt;br /&gt;
* Create '''Object '''references to '''name '''and '''id parameter'''&lt;br /&gt;
* Create two''' objects '''using the '''Employee '''function&lt;br /&gt;
* '''Log''' the created '''objects''' in the '''console'''&lt;br /&gt;
* Open the file '''MyPage.html '''in a '''web''' '''browser'''.&lt;br /&gt;
* Observe the output in the '''browser’s console'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh.&lt;br /&gt;
&lt;br /&gt;
And this is Praveen from IIT Bombay signing off. &lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C2/Loops-in-JS/English</id>
		<title>JavaScript/C2/Loops-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C2/Loops-in-JS/English"/>
				<updated>2021-02-03T04:35:07Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script:Loops in JS&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, for, while, do.. While, for..in&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and Welcome to the spoken tutorial on “'''Loops in JS'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* Different types of '''Loops''' in '''JS'''&lt;br /&gt;
* And their usage&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.51.1 ('''code editor''')&lt;br /&gt;
* '''Firefox''' web browser&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Types of Loops in JS&lt;br /&gt;
|| The different '''types''' of '''loops''' are:&lt;br /&gt;
* '''for loop'''&lt;br /&gt;
* '''while loop'''&lt;br /&gt;
* '''do..while loop'''&lt;br /&gt;
* '''for..in loop'''&lt;br /&gt;
&lt;br /&gt;
Let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to the '''Visual Studio Code editor'''.&lt;br /&gt;
|| Switch to the '''Visual Studio Code editor'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Welcome Page -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Folder -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Practice-JS'''&lt;br /&gt;
|| In the '''Welcome page, '''click on the '''Open folder link '''at the top left corner'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Browse and locate the folder “'''Practice-JS''' ”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK '''button at the top right corner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Click on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Explorer '''panel -&amp;gt; '''Practice-JS''' -&amp;gt; '''index.html'''&lt;br /&gt;
|| In the '''Explorer '''panel on the left, under '''Practice-JS''' click on the file named '''index.html'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We had created this file earlier. The same is available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt;Loops&amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;main.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, replace the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this code we have written a small '''HTML''' code and linked the''' JS file'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Alt + L and Alt + O &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Now press the key combinations '''Alt + L''' and''' Alt + O.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Live server''' gets started.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show firefox&lt;br /&gt;
|| The default '''browser '''will open automatically and a new '''tab '''opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the '''Browser''' '''developer tools'''&lt;br /&gt;
|| Now press '''Ctrl + Shift + I''' keys together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Browser developer tools''' panel opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Click on the &amp;lt;/nowiki&amp;gt;'''Console''' tab&lt;br /&gt;
|| Now click on the '''console tab''' in the '''developer tools.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Click on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Explorer '''panel -&amp;gt; '''Practice-JS''' -&amp;gt; '''main.js'''&lt;br /&gt;
|| In the '''Explorer '''panel on the left, under '''Practice-JS''' click on the file named '''main.js'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;for (var i = 0; i &amp;lt; 5; i++) {&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(i);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this code we have written a '''for loop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var i = 0&lt;br /&gt;
|| Let me explain how the '''for loop '''works in '''JS.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the '''for loop, '''the '''variable''' is first initialized. We have initialised '''i''' to zero.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;i &amp;lt; 5&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Next, the '''condition''' is checked for the value of '''i = 0.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As the value of '''i''' is less than 5, the '''condition''' is '''true.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(i);&lt;br /&gt;
|| So, the '''block''' of '''code '''within the '''for loop''' gets executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, in our case we just '''log''' the value'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
i++&lt;br /&gt;
|| After this we increment '''i''' by 1 using '''i++, '''which is basically '''i = i +1'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note '''i++''' is a '''post increment operator'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now the value of '''i''' becomes '''1.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Again the '''condition''' is checked and the process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''for loop''' will only end when the '''condition''' '''returns''' '''false.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will '''logically '''happen when the value of '''i '''becomes 5.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''0'''&lt;br /&gt;
&lt;br /&gt;
'''1'''&lt;br /&gt;
&lt;br /&gt;
'''2'''&lt;br /&gt;
&lt;br /&gt;
'''3'''&lt;br /&gt;
&lt;br /&gt;
'''4'''&lt;br /&gt;
|| We see the output as '''0 1 2 3 4.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After '''4,''' the value of '''i''' would become '''5.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now when the '''&amp;lt;nowiki&amp;gt;condition i less than &amp;lt;/nowiki&amp;gt;5''' is checked, it will '''return false.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So the '''block''' doesn’t get executed''' '''and thus the '''loop terminates.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us learn about '''while loop.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var n = 0;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;while (n &amp;lt; 5) {&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(n);&lt;br /&gt;
&lt;br /&gt;
n++;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var n = 0;&lt;br /&gt;
|| Let me explain how the '''while loop '''works.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''variable''' is '''declared''' once outside the '''loop''' and also initialised. We have initialised to 0.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;while (n &amp;lt; 5)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Then comes the '''while loop'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This '''loop '''is also called an '''entry controlled loop'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''condition '''is always checked before entering the '''block.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only if the '''condition returns true,'''  the '''block '''get '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the '''condition returns false, '''the '''loop terminates.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(n);&lt;br /&gt;
|| Here, the '''block''' of code gets '''executed''' and '''logs''' the value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
n++;&lt;br /&gt;
|| Here, inside the '''block''' we have written '''n++''' &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is also a '''post increment operator''' which basically means '''n = n+1.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''0'''&lt;br /&gt;
&lt;br /&gt;
'''1'''&lt;br /&gt;
&lt;br /&gt;
'''2'''&lt;br /&gt;
&lt;br /&gt;
'''3'''&lt;br /&gt;
&lt;br /&gt;
'''4'''&lt;br /&gt;
|| Now, we see the output as '''0 1 2 3 4.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After '''4''' the value of '''n''' would become '''5.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now when the '''condition''' '''&amp;lt;nowiki&amp;gt;n less than &amp;lt;/nowiki&amp;gt;5''' is checked, it will return '''false.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So it will not enter the '''block '''and thus the '''loop terminates.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now, let us learn about '''do.. while loop.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var m = 0;&lt;br /&gt;
&lt;br /&gt;
do {&lt;br /&gt;
&lt;br /&gt;
console.log(m);&lt;br /&gt;
&lt;br /&gt;
m++;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;} while (m &amp;lt; 5);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
var m = 0;&lt;br /&gt;
|| The '''variable declaration''' and '''initialisation''' happens outside the '''loop'''.&lt;br /&gt;
&lt;br /&gt;
We have '''initialised''' the '''variable m''' to zero.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| This '''loop '''is also called an '''exit controlled loop '''because the '''condition check''' will happen at the end.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
do {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In '''do.. while loop''', the '''condition '''is always checked while exiting the '''block.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So even if the '''condition''' is not satisfied, the '''block '''gets '''executed '''at least once.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the '''condition returns false, '''the '''loop terminates.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(m);&lt;br /&gt;
&lt;br /&gt;
m++;&lt;br /&gt;
|| In the '''loop''', we are just '''logging''' the value and then increasing it by 1.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here also we have used the '''post-increment operator''' to do so.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;while (m &amp;lt; 5);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| This is where the '''condition check''' happens.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the '''condition returns true''', the '''loop''' gets '''executed''' again.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the '''condition returns false''' the '''loop terminates'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''0'''&lt;br /&gt;
&lt;br /&gt;
'''1'''&lt;br /&gt;
&lt;br /&gt;
'''2'''&lt;br /&gt;
&lt;br /&gt;
'''3'''&lt;br /&gt;
&lt;br /&gt;
'''4'''&lt;br /&gt;
|| Now, we see the output as '''0 1 2 3 4.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After '''4''' the value of '''m''' would become '''5'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now when the '''condition''' '''&amp;lt;nowiki&amp;gt;m less than &amp;lt;/nowiki&amp;gt;5''' is checked, it will '''return false.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So it will not enter the '''block '''and thus the '''loop terminates.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Comparison between loops&lt;br /&gt;
|| To conclude, if the '''condition''' is not satisfied-&lt;br /&gt;
&lt;br /&gt;
* The '''for loop '''and '''while loop''' immediately '''terminates''' and does not '''execute''' the '''block '''at all&lt;br /&gt;
** It’s also called as '''Entry controlled loop'''&lt;br /&gt;
* The '''do..while loop''' will '''execute''' the '''block''' at least once before '''terminating'''&lt;br /&gt;
** It’s also called as '''Exit controlled loop'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Iteration over an array&lt;br /&gt;
|| All these three '''loops''' can iterate over an '''array '''taking the '''index''' value as '''counter.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Next, we shall learn how to '''loop '''over properties of an '''object'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For this we will be using the '''for .. in loop.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var obj = {&lt;br /&gt;
&lt;br /&gt;
name1: &amp;quot;Spoken&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
name2: &amp;quot;Tutorials&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
for (var key in obj) {&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;console.log(obj[key]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var obj = {&lt;br /&gt;
&lt;br /&gt;
name1: &amp;quot;Spoken&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
name2: &amp;quot;Tutorials&amp;quot;,&lt;br /&gt;
&lt;br /&gt;
};&lt;br /&gt;
|| Here, we are '''initializing''' an '''object '''to '''loop '''over and print the values in all the '''object properties'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
for (var key in obj)&lt;br /&gt;
|| In this '''loop''', we need to create a temporary '''variable, '''which holds the '''property '''in each and every iteration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, we have created and named it as '''key.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''key '''would be '''name1''' in first iteration and '''name2''' in second iteration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And '''obj '''refers to the '''object '''which we have created above to iterate. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;console.log(obj[key]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, we are '''logging''' the value as '''&amp;lt;nowiki&amp;gt;obj[key]&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is one way to access the value of a '''property''' in an '''object.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We have learnt to access '''objects''' earlier in this series.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you are not confident, kindly go through the '''Data Types in JS''' tutorial in this series.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Spoken'''&lt;br /&gt;
&lt;br /&gt;
'''Tutorials'''&lt;br /&gt;
|| Here, we see in the output that the values for all the '''properties '''in the '''object '''are printed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This indicates that we have successfully iterated over the '''object.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt about:&lt;br /&gt;
* '''for Loop'''&lt;br /&gt;
* '''while Loop'''&lt;br /&gt;
* '''do..while Loop'''&lt;br /&gt;
* '''for..in Loop '''in '''JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
* Open the file '''assignment.js''' which you have created earlier&lt;br /&gt;
* Clear the existing code&lt;br /&gt;
* '''Loop '''the numbers from 1 to 100&lt;br /&gt;
* '''Log''' the values which are divisible by 3&lt;br /&gt;
* Open the file '''MyPage.html '''in a '''web browser'''.&lt;br /&gt;
* Observe the output in the '''browser’s console'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh.&lt;br /&gt;
&lt;br /&gt;
And this is Praveen from IIT Bombay signing off. &lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C2/Operators-in-JS/English</id>
		<title>JavaScript/C2/Operators-in-JS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C2/Operators-in-JS/English"/>
				<updated>2021-02-03T03:55:15Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script:Operators in JS&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, Operators, Arithmetic, Logical, Assignment, Comparison, Ternary&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and Welcome to the spoken tutorial on “'''Operators in JS'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* Different '''types''' of '''Operators''' in '''JS'''&lt;br /&gt;
* And their usage&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.51.1 ('''code editor''')&lt;br /&gt;
* '''Firefox''' web browser&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with writing and executing''' JS''' files.&lt;br /&gt;
* If not, please go through the prerequisite tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practicing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Types of Operators&lt;br /&gt;
|| The different '''types''' of '''operators''' used in '''JS''' are:&lt;br /&gt;
* '''Assignment operator'''&lt;br /&gt;
* '''Arithmetic operators'''&lt;br /&gt;
* '''Comparison operators'''&lt;br /&gt;
* '''Logical operators'''&lt;br /&gt;
* '''Ternary operator'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment Operator&lt;br /&gt;
|| '''&amp;lt;nowiki&amp;gt;= (Equal to) &amp;lt;/nowiki&amp;gt;'''is an '''assignment''' '''operator''' in '''JS.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Arithmetic Operators&lt;br /&gt;
|| '''Arithmetic operators''' in '''JS''' are &lt;br /&gt;
* '''+ '''(Addition)&lt;br /&gt;
* '''- '''(Subtraction)&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;* &amp;lt;/nowiki&amp;gt;'''(Multiplication)&lt;br /&gt;
* '''/ '''(Division)&lt;br /&gt;
* '''% '''(Modulo)&lt;br /&gt;
&lt;br /&gt;
Let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||Open the '''Visual Studio Code editor'''.&lt;br /&gt;
||Open the '''Visual Studio Code editor'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Welcome Page -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Folder -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Practice-JS'''&lt;br /&gt;
|| In the '''Welcome page, '''click on the '''Open folder link '''at the top left corner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Browse and locate the folder “'''Practice-JS''' ”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK '''button at the top right corner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Click on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Explorer '''panel-&amp;gt; '''Practice-JS''' -&amp;gt; '''index.html'''&lt;br /&gt;
|| In the '''Explorer '''panel on the left, under '''Practice-JS''' click on the file named '''index.html'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We had created this file earlier. The same is available in the '''Code files''' link for practice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt; Operators&amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;main.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html''' file, replace the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this code we have written a sample '''HTML '''code and linked the '''JS file'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Alt + L and Alt + O &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Now press the key combinations '''Alt + L''' and''' Alt + O.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Live server''' gets started.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show firefox&lt;br /&gt;
|| The default '''browser '''will open automatically and a new '''tab '''opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the '''Browser developer tools'''&lt;br /&gt;
|| Now press '''Ctrl + Shift + I''' keys together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Browser developer tools''' panel opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Click on the &amp;lt;/nowiki&amp;gt;'''Console''' tab&lt;br /&gt;
|| Now click on the '''console tab''' in the '''developer tools.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Click on &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Explorer '''panel-&amp;gt; '''Practice-JS''' -&amp;gt; '''main.js'''&lt;br /&gt;
|| In the '''Explorer '''panel on the left, under '''Practice-JS''' click on the file named '''main.js'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var m = 20;&lt;br /&gt;
&lt;br /&gt;
var n = 10;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log('m + n', m + n);&lt;br /&gt;
&lt;br /&gt;
console.log('m - n', m - n);&lt;br /&gt;
&lt;br /&gt;
console.log('m * n', m * n);&lt;br /&gt;
&lt;br /&gt;
console.log('m / n', m / n);&lt;br /&gt;
&lt;br /&gt;
console.log('m % n', m % n);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This code will execute all 5 '''arithmetic operators'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let me explain in detail.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var m = 20;&lt;br /&gt;
&lt;br /&gt;
var n = 10;&lt;br /&gt;
|| Here we have created two '''variables''' '''m''' and '''n''' and assigned values to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, '''equal to '''is the '''assignment operator'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That is the reason we are able to assign a '''value''' to '''m''' and''' n '''respectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We would then be using these assigned values with the '''arithmetic operators.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log('m + n', m + n);&lt;br /&gt;
&lt;br /&gt;
console.log('m - n', m - n);&lt;br /&gt;
&lt;br /&gt;
console.log('m * n', m * n);&lt;br /&gt;
&lt;br /&gt;
console.log('m / n', m / n);&lt;br /&gt;
&lt;br /&gt;
console.log('m % n', m % n);&lt;br /&gt;
|| As seen in the slide, these are five '''arithmetic operators'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are calculating the resultant '''values.'''&lt;br /&gt;
&lt;br /&gt;
For example: '''m plus n, m minus n''' and so on and displaying the results.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(''''m + n'''',''' '''m + n);&lt;br /&gt;
|| Here, '''m+n''' is within quotes, so that it gets printed on the '''console''' for understanding purposes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Likewise, we are printing all the values one after another.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log('m + n',''' m + n''');&lt;br /&gt;
|| Here, '''m''' and '''n''' are the '''variables''' which are first initialized.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then the values are computed and the results are displayed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Like in other programming languages, in '''JS '''also it is not necessary to have any '''format specifiers''' for '''values'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''m + n 30'''&lt;br /&gt;
&lt;br /&gt;
'''m - n 10'''&lt;br /&gt;
&lt;br /&gt;
'''m * n 200'''&lt;br /&gt;
&lt;br /&gt;
'''m / n 2'''&lt;br /&gt;
&lt;br /&gt;
'''m % n 0'''&lt;br /&gt;
|| We can see the output displayed&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''m + n is 30'''&lt;br /&gt;
* '''m - n is 10'''&lt;br /&gt;
* '''m * n is 200'''&lt;br /&gt;
* '''m / n is 2'''&lt;br /&gt;
* '''m % n is 0'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Comparison Operators&lt;br /&gt;
|| Next let us learn about '''Comparison operators'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These are&lt;br /&gt;
* '''&amp;gt; '''(Greater than)&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt; &amp;lt;/nowiki&amp;gt;'''(Less than)&lt;br /&gt;
* '''&amp;gt;= '''(Greater than or equal to)&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;&amp;lt;= &amp;lt;/nowiki&amp;gt;'''(Less than or equal to)&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;== &amp;lt;/nowiki&amp;gt;'''(Equal to)&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;=== &amp;lt;/nowiki&amp;gt;'''(Equal value and Equal type)&lt;br /&gt;
* '''!= '''(Not equal to)&lt;br /&gt;
&lt;br /&gt;
Let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var m = 20;&lt;br /&gt;
&lt;br /&gt;
var n = 10;&lt;br /&gt;
&lt;br /&gt;
var z = &amp;quot;20&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log('m &amp;gt; n', m &amp;gt; n);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;console.log('m &amp;lt; n', m &amp;lt; n);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log('m &amp;gt;= n', m &amp;gt;= n);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;console.log('m &amp;lt;= n', m &amp;lt;= n);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log('m == z', m == z);&lt;br /&gt;
&lt;br /&gt;
console.log('m === z', m === z);&lt;br /&gt;
&lt;br /&gt;
console.log('m != z', m != n);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This code will execute all the '''comparison operators''' one after another. &lt;br /&gt;
&lt;br /&gt;
Let me explain the code in detail.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var m = 20;&lt;br /&gt;
&lt;br /&gt;
var n = 10;&lt;br /&gt;
&lt;br /&gt;
var z = &amp;quot;20&amp;quot;;&lt;br /&gt;
|| Here we have created three '''variables''' '''m''', '''n''' and '''z''' and assigned '''values '''to them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We would be using these '''values''' with the '''comparison operators.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log('m &amp;gt; n', m &amp;gt; n);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;console.log('m &amp;lt; n', m &amp;lt; n);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log('m &amp;gt;= n', m &amp;gt;= n);&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;console.log('m &amp;lt;= n', m &amp;lt;= n);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log('m != z', m != n);&lt;br /&gt;
|| Here we are comparing '''m, n''' and '''z''' with all the possible '''operators'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When comparing the '''values''' using these '''comparison operators''', the '''compiler''' only returns '''true''' or '''false.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log('m &amp;gt; n', m &amp;gt; n);&lt;br /&gt;
|| For example- how do we answer the question, “Is '''m &amp;gt; n'''?”''' '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We know that '''m '''is '''20''' and '''n '''is '''10'''. So we say, '''YES'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similarly '''JS''' returns '''boolean value true'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please note. '''Comparison operators '''compare only the '''value '''not the '''type'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log('m == z', '''m == z''');&lt;br /&gt;
|| In '''m == z, '''we are comparing whether '''m''' is equal to '''z''' or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Though the '''values''' are the same that is '''20''', '''m '''is of '''type number '''and '''z '''is of '''type string.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''comparison operator '''compares''' '''only the '''values''' and this returns '''true '''in the '''console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log('m === z', '''m === z''');&lt;br /&gt;
|| '''Equal value and equal type''' is a special case in '''JS'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So if we compare '''m (===) equal value and equal type z, JS compiler''' does not check '''values''' alone, it even checks the '''type'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only if the '''values''' and '''types''' are both the same, the '''compiler '''returns '''true'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the major difference between '''&amp;lt;nowiki&amp;gt;(==) equal to &amp;lt;/nowiki&amp;gt;'''and '''&amp;lt;nowiki&amp;gt;(===) equal value and equal type operators&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''m &amp;gt; n true'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;m &amp;lt; n false&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''m &amp;gt;= n true'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;m &amp;lt;= n false&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''m == z true'''&lt;br /&gt;
&lt;br /&gt;
'''m === z false'''&lt;br /&gt;
&lt;br /&gt;
'''m != z true'''&lt;br /&gt;
|| We can see the output on the '''console.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''m &amp;gt; n is true'''&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;m &amp;lt; n is false&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
* '''m &amp;gt;= n is true'''&lt;br /&gt;
* '''&amp;lt;nowiki&amp;gt;m &amp;lt;= n is false&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
* '''m == z is true'''&lt;br /&gt;
* '''m === z is false'''&lt;br /&gt;
* '''m != z is true'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Logical Operators&lt;br /&gt;
|| Next let us learn about '''Logical operators'''. These are &lt;br /&gt;
* '''&amp;amp;&amp;amp; (Logical AND)'''&lt;br /&gt;
* '''|| (Logical OR)''' and &lt;br /&gt;
* '''! (Logical NOT)'''&lt;br /&gt;
&lt;br /&gt;
Let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var a = true;&lt;br /&gt;
&lt;br /&gt;
var m = 20;&lt;br /&gt;
&lt;br /&gt;
var n = 10;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log('m &amp;gt; n &amp;amp;&amp;amp; a', m &amp;gt; n &amp;amp;&amp;amp; a);&lt;br /&gt;
&lt;br /&gt;
console.log('m &amp;gt; n || a', m &amp;gt; n || a);&lt;br /&gt;
&lt;br /&gt;
console.log('!a', !a);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this code, we will use the '''logical operators''' in different combinations and see the results. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var a = true;&lt;br /&gt;
&lt;br /&gt;
var m = 20;&lt;br /&gt;
&lt;br /&gt;
var n = 10;&lt;br /&gt;
|| Here, we take three '''variables a''', '''m '''and '''n '''and initialize each of them with some values'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will be using these '''variable '''values''' '''with the '''logical operators'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log('m &amp;gt; n &amp;amp;&amp;amp; a', m &amp;gt; n &amp;amp;&amp;amp; a);&lt;br /&gt;
|| '''Logical AND''' is used between two or more '''conditions'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only if all the '''conditions''' are satisfied, the '''JS compiler '''will return '''true.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In our example '''m''' is greater than '''n ''', which is''' true '''and '''a''' is '''true. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So since both are '''true, JS compiler''' concludes the result as '''true.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log('m &amp;gt; n || a', m &amp;gt; n || a);&lt;br /&gt;
|| '''Logical OR, '''is also used between two or more '''conditions'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If any one '''condition''' is satisfied, the '''JS compiler '''will return '''true.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In our example '''m''' is less than '''n''', which is''' false '''and '''a''' is '''true. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So since we have one '''true,''' '''JS compiler''' concludes the result as '''true.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log('!a', !a);&lt;br /&gt;
|| '''Logical NOT''' is always used to return the opposite '''boolean.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since we have declared '''a''' is '''true, '''adding''' (!) exclamation '''would become !'''true'''.&lt;br /&gt;
&lt;br /&gt;
And so the result will be '''false.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''m &amp;gt; n &amp;amp;&amp;amp; a true'''&lt;br /&gt;
&lt;br /&gt;
'''m &amp;gt; n || a true'''&lt;br /&gt;
&lt;br /&gt;
'''!a false'''&lt;br /&gt;
|| This is the output we see.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* '''m &amp;gt; n &amp;amp;&amp;amp; a '''is''' true'''&lt;br /&gt;
* '''m &amp;gt; n || a '''is''' true'''&lt;br /&gt;
* '''!a '''is''' false'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''Ternary Operator'''&lt;br /&gt;
|| Next, let’s learn about the '''Ternary operator.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ternary operator''' takes three '''operands''' - &lt;br /&gt;
&lt;br /&gt;
* A '''condition''' followed by a '''question mark'''&lt;br /&gt;
* '''Expression 1''' to be executed if the '''condition''' is satisfied followed by a '''colon'''&lt;br /&gt;
* '''Expression 2''' to be executed if the '''condition''' is satisfied&lt;br /&gt;
&lt;br /&gt;
The '''syntax''' is as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This '''operator''' can also be used as a shortcut for the '''if statement'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var m = 20;&lt;br /&gt;
&lt;br /&gt;
var n = 10;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
m &amp;gt; n ? console.log(&amp;quot;m is greater than n&amp;quot;) : console.log(&amp;quot;m is less than n&amp;quot;);&lt;br /&gt;
|| In the '''main.js '''file, replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
var m = 20;&lt;br /&gt;
&lt;br /&gt;
var n = 10;&lt;br /&gt;
|| Here we have '''declared''' two '''variables''' and initialized them with some values.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
m &amp;gt; n &lt;br /&gt;
|| Here we are checking whether the '''condition m greater than n''' is '''true.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As per the values, it will return '''true.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
? '''console.log(&amp;quot;m is greater than n&amp;quot;)''' &lt;br /&gt;
|| So, the code after the '''question mark,''' '''console.log(&amp;quot;m is greater than n&amp;quot;) '''gets '''executed'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: '''console.log(&amp;quot;m is less than n&amp;quot;)'''&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| If the '''condition''' were to '''return false''', the code after the '''colon '''would be '''executed'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''m is greater than n'''&lt;br /&gt;
|| Here, we can see the output '''m is greater than n''' because the '''condition''' is '''true.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| var m = 20;&lt;br /&gt;
&lt;br /&gt;
var n = 100;&lt;br /&gt;
|| Change the value of '''n''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file and observe the change in the '''console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''m is less than n'''&lt;br /&gt;
|| We can see the output '''m is less than n''' because the '''condition''' is '''false.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt about:&lt;br /&gt;
* '''Assignment Operator'''&lt;br /&gt;
* '''Arithmetic Operators'''&lt;br /&gt;
* '''Comparison Operators'''&lt;br /&gt;
* '''Logical Operators'''&lt;br /&gt;
* '''Ternary Operator''' in '''JS'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment:&lt;br /&gt;
* Open the file '''assignment.js''' which you have created earlier&lt;br /&gt;
* Clear the existing code&lt;br /&gt;
* Create three '''variables a, b '''and '''c'''&lt;br /&gt;
* Assign two random numbers to '''a''' and '''b'''&lt;br /&gt;
* Assign a '''boolean''' value to '''c'''&lt;br /&gt;
* Only if the sum of '''a '''and '''b''' is more than 20 and, '''c''' is '''true''', '''log''' the sum of '''a''' and '''b'''&lt;br /&gt;
* Else '''log''' “'''unable to display result'''”&lt;br /&gt;
* Open the file '''MyPage.html '''in a '''web''' '''browser'''.&lt;br /&gt;
* Observe the output in the '''browser’s console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh.&lt;br /&gt;
&lt;br /&gt;
And this is Praveen from IIT Bombay signing off. &lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/JavaScript/C2/How-to--use-JS-in-HTML/English</id>
		<title>JavaScript/C2/How-to--use-JS-in-HTML/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/JavaScript/C2/How-to--use-JS-in-HTML/English"/>
				<updated>2021-02-02T17:17:02Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: How to use JS in HTML&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: JavaScript, HTML, script, body&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Hello and Welcome to the spoken tutorial on “'''How to use Javascript in HTML'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* The different approaches to use '''Javascript (JS)''' with '''HTML'''&lt;br /&gt;
* When to use each approach&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Visual Studio Code''' version 1.51.1 ('''code editor''')&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
&lt;br /&gt;
However you may use any other''' browser''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should have some basic knowledge on '''HTML'''&lt;br /&gt;
* Basic understanding of concepts of any programming language&lt;br /&gt;
* If not then please go through the '''HTML''' and any '''programming language''' series on this website.&lt;br /&gt;
* Also, you should have an internet connection to install the necessary packages&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practicing.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Approaches to use JS with HTML&lt;br /&gt;
|| There are mainly two approaches to use '''JS '''with '''HTML.'''&lt;br /&gt;
* First approach is '''embedding JS '''in '''HTML'''&lt;br /&gt;
* Second approach is '''importing '''an external '''JS '''file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Embedding JS in HTML&lt;br /&gt;
|| &lt;br /&gt;
* We need to write '''JS '''code in between '''script tags''' in the '''HTML '''file.&lt;br /&gt;
* The '''script tag''' should be written after the last '''HTML element''' in the '''body tag'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Adding '''script tag''' after the last '''element''' in the '''body tag''' is a preferred way but not the only way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This depends on when we want the '''JS '''to load.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Point to the '''Practice-JS '''folder on '''Desktop'''&lt;br /&gt;
|| Let’s create a folder named '''Practice-JS''' on our '''Desktop. '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Open Visual Studio Code editor.&lt;br /&gt;
|| I will use '''Visual Studio Code editor '''for this demonstration'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide IDE - Extension&lt;br /&gt;
|| &lt;br /&gt;
* To make the development easier, we would be using an extension called '''Live Server''' in '''VS Code'''.&lt;br /&gt;
* It is free and easily installable. &lt;br /&gt;
* This would help us in '''hot reload.'''&lt;br /&gt;
* This means that any code change is automatically reflected on the '''browser''' when we save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Welcome Page -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Folder -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Practice-JS''' &lt;br /&gt;
|| In the '''Welcome page, '''click on the '''Open folder link '''at the top left corner'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Browse and locate the folder “'''Practice-JS''' ”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK''' button at the top right corner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Click on the &amp;lt;/nowiki&amp;gt;'''Extension''' icon on the left&lt;br /&gt;
|| Click on the '''Extensions '''icon in the left side '''activity bar.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] [Extension Tab]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type: live server&lt;br /&gt;
|| In the '''search bar''', type “'''Live Server'''”. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Install '''button adjacent to '''Live Server''' extension.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| The installation may take some time depending upon your '''internet''' speed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Close and reopen Visual Code Studio&lt;br /&gt;
|| After installation, restart the '''editor''' by closing and opening it again.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click on '''add file icon'''&lt;br /&gt;
|| Go to the '''Explorer '''panel on the left hand side.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''New file''' icon beside the '''Practice-JS folder''' name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''place holder''' would be highlighted when clicked.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type &amp;lt;/nowiki&amp;gt;'''index.html'''&lt;br /&gt;
|| Type''' index.html''' as the file name. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Make sure you name it as '''index '''only. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because the '''server renders''' the '''index page''' by default. &lt;br /&gt;
&lt;br /&gt;
Press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
The file '''index.html '''opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt;How to use JS in HTML&amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;h1&amp;gt;Welcome to Spoken &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;Tutorials&amp;lt;/h1&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
if (true) {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;I'm inside if!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;I'm inside else!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''index.html '''file, type the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To save time, you could copy-paste the same from the '''Code files'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this code we have written a simple '''HTML '''code having a welcome message and''' script tag'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Alt + L and Alt + O &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Now press the key combinations '''Alt + L''' and''' Alt + O.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Live server''' gets started.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If the '''Live Server''' is not started, go to '''Extensions panel.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And check if you have installed '''Live Server''' properly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Else reinstall it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Show firefox&lt;br /&gt;
|| The default '''browser '''will open automatically and a new '''tab '''opens.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In my case it is '''Firefox browser'''. You could use any '''browser'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Point to &amp;lt;/nowiki&amp;gt;'''Welcome to Spoken Tutorials'''&lt;br /&gt;
|| '''Welcome to Spoken Tutorials '''is displayed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Press&amp;lt;/nowiki&amp;gt;''' Ctrl + Shift + I'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Point to the browser '''developer tools'''&lt;br /&gt;
|| Now press '''Ctrl + Shift + I''' keys together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Browser developer tools''' panel opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] Click on the &amp;lt;/nowiki&amp;gt;'''Console''' tab&lt;br /&gt;
|| Now click on the '''console tab''' in the '''developer tools.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Firefox] &amp;lt;/nowiki&amp;gt;Highlight &lt;br /&gt;
&lt;br /&gt;
'''I'm inside if!'''&lt;br /&gt;
|| You can see '''I'm inside if! '''printed in the '''console.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you are running the '''live server''' - '''Live reload enabled''' message would also be displayed always.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can ignore this.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here we have used a''' script tag''' to '''embed JS code''' in an '''HTML '''file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It’s always a good practice to use the '''script tag''' after the last '''element''' in the '''body tag'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if (true) {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;I'm inside if!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;I'm inside else!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| We have written a simple '''if else condition''', where''' '''the '''if condition''' is always '''true''' and the '''if block''' gets executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;I'm inside if!&amp;quot;);&lt;br /&gt;
|| The '''console.log statement''' is used to print the message on the '''console'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Going forward we will be using '''console.log statements''' widely to see the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Next let us learn another approach.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Importing External JS File&lt;br /&gt;
|| &lt;br /&gt;
* We will create a new '''JS''' file, and write '''JS''' code in the file&lt;br /&gt;
* Then '''link''' the created '''JS''' file with '''HTML''' using '''script''' '''src''' '''tag'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click on '''add file icon'''&lt;br /&gt;
|| In the '''Explorer '''panel on the left hand side, click on the '''New file icon''' beside the '''Practice-JS''' folder name.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A '''place holder''' would be highlighted when clicked.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type &amp;lt;/nowiki&amp;gt;'''main.js'''&lt;br /&gt;
|| Type''' main.js '''as the file name and press '''Enter'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file extension for '''JS '''files is '''.js '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file '''main.js '''opens.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if (true) {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;I'm inside if!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;I'm inside else!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''main.js''' file, type the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this code we have written a simple''' if/else condition.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;!DOCTYPE html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;html lang=&amp;quot;en&amp;quot;&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;title&amp;gt;How to use JS in HTML&amp;lt;/title&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;h1&amp;gt;Welcome to Spoken Tutorials&amp;lt;/h1&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;main.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;/html&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Switch to the '''index.html''' file and replace the '''code''' as shown here.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this code we have a welcome message along with the '''source''' to the '''JS file'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press: Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to '''Browser'''&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Browser] [Console Tab]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight: '''I'm inside if!'''&lt;br /&gt;
|| Now, we can see the output, '''I'm inside if!'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&amp;lt;script src=&amp;quot;main.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here we have used a''' script tag''', with property '''src '''which takes the path to the '''JS '''file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In our case both''' index.html''' and '''main.js''' are in the same '''folder'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, we have simply mentioned the '''path''' as '''main.js'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if (true) {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;I'm inside if!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;I'm inside else!&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''main.js '''file, we have written the same''' if else condition'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The''' if-condition''' is always '''true''' and the '''if block''' gets executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
console.log(&amp;quot;I'm inside if!&amp;quot;);&lt;br /&gt;
|| The '''console.log statement''' is used to print the message on the '''console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now, let’s conclude which is the better approach.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Embedded approach&lt;br /&gt;
|| &lt;br /&gt;
* In the '''embedded''' approach, we have written '''JS''' code in an '''HTML''' file using '''script''' '''tag'''&lt;br /&gt;
* This code is only used for that particular '''HTML''' file and cannot be reused in any other '''HTML''' file&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Importing External '''JS '''File&lt;br /&gt;
|| Whereas, in the second approach,&lt;br /&gt;
* We have written '''JS''' code by creating an external file and linking it to the '''HTML''' file.&lt;br /&gt;
* Using this approach, we can use the same '''JS''' code in different '''HTML''' files by just '''linking''' it.&lt;br /&gt;
* This solves the problem of writing the same code in different files so we can reuse the same.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* Different approaches to use '''JS''' with '''HTML'''&lt;br /&gt;
* And their implications in coding&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment,&lt;br /&gt;
* Create a file named '''assignment.js'''&lt;br /&gt;
* Log '''A''' and '''B '''characters&lt;br /&gt;
* Create a file named '''MyPage.html''' &lt;br /&gt;
* '''Link''' the '''assignment.js '''file to it&lt;br /&gt;
* Observe the output in the '''browser’s console'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Answers for THIS Spoken Tutorial&lt;br /&gt;
|| &lt;br /&gt;
* Do you have questions in THIS Spoken Tutorial?&lt;br /&gt;
* Please visit this site.&lt;br /&gt;
* Choose the minute and second where you have the question.&lt;br /&gt;
* Explain your question briefly.&lt;br /&gt;
* The Spoken Tutorial project will ensure an answer.&lt;br /&gt;
* You will have to register to ask questions.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Forum for specific questions&lt;br /&gt;
|| &lt;br /&gt;
* The Spoken Tutorial forum is for specific questions on this tutorial.&lt;br /&gt;
* Please do not post unrelated and general questions on them.&lt;br /&gt;
* This will help reduce the clutter.&lt;br /&gt;
* With less clutter, we can use these discussions as instructional material.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education (MoE), Government of India.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| The script for this tutorial is contributed by Jayesh.&lt;br /&gt;
&lt;br /&gt;
And this is Praveen from IIT Bombay signing off. &lt;br /&gt;
&lt;br /&gt;
Thank you for joining.&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/CSS/C2/Overview-of-CSS/English</id>
		<title>CSS/C2/Overview-of-CSS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/CSS/C2/Overview-of-CSS/English"/>
				<updated>2021-02-02T16:43:48Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script: '''Overview of CSS&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Neha Solanki&lt;br /&gt;
&lt;br /&gt;
'''Domain Reviewer: '''Ankita Maske, Om Prakash Soni&lt;br /&gt;
&lt;br /&gt;
'''Novice Reviewer: '''Madhuri Ganapathi&lt;br /&gt;
&lt;br /&gt;
'''Keywords: '''CSS, HTML, Web Page, Web Design, Video Tutorial, Spoken Tutorial&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  | '''Visual Cue'''&lt;br /&gt;
|  | '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Title&lt;br /&gt;
|  | Hello and welcome to the spoken tutorial on “Overview of '''CSS'''”. &lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Learning Objectives&lt;br /&gt;
|  | In this tutorial, we will learn:&lt;br /&gt;
&lt;br /&gt;
* About '''CSS '''and&lt;br /&gt;
* The content available in various tutorials in this series&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: '''CSS'''&lt;br /&gt;
|  | What is '''CSS'''?&lt;br /&gt;
&lt;br /&gt;
'''CSS''' stands for '''Cascading Style Sheet.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: '''CSS'''&lt;br /&gt;
|  | &lt;br /&gt;
* It''' '''is a '''style sheet''' language.&lt;br /&gt;
* It is used to '''style''' documents written in '''markup''' language like''' HTML''', '''XML '''etc.&lt;br /&gt;
* It is an independent file and saved with '''[dot] css (.css)''' extension.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: '''CSS'''&lt;br /&gt;
|  | &lt;br /&gt;
* It allows '''developers''' to control how the '''webpage''' should be displayed.&lt;br /&gt;
* For e.g color, font, space, etc.&lt;br /&gt;
* It is platform independent and hence works on all '''operating systems'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Prerequisites for using '''CSS'''&lt;br /&gt;
|  | To work with '''CSS,''' we need-&lt;br /&gt;
&lt;br /&gt;
* A '''text editor '''or a '''WYSIWYG editor''' to&lt;br /&gt;
** write our '''CSS '''code and&lt;br /&gt;
** understand various '''CSS '''properties&lt;br /&gt;
* A '''web browser''' to display the '''formatted''' content.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: For recording of '''CSS''' series&lt;br /&gt;
|  | Throughout this series I will be using:&lt;br /&gt;
* '''CSS3'''&lt;br /&gt;
* '''HTML5'''&lt;br /&gt;
* '''gedit Text Editor'''&lt;br /&gt;
* '''Firefox web browser '''and&lt;br /&gt;
* '''Ubuntu Linux OS v 18.04'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | &lt;br /&gt;
|  | Now, we will briefly go through some of the individual tutorials in this series. &lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of First CSS File&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00 - 00:04&lt;br /&gt;
&lt;br /&gt;
03:35 - 03:43&lt;br /&gt;
&lt;br /&gt;
05:44 - 05:50 ] &lt;br /&gt;
&lt;br /&gt;
|  | '''First CSS File '''is the introductory tutorial of the series.&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will learn how to create a '''CSS''' file and the '''syntax''' of '''CSS.'''&lt;br /&gt;
&lt;br /&gt;
We’ll also see how to '''link''' a '''CSS''' file with an '''HTML''' file and see the output on a '''web browser'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of Dimensions and Measuring Units&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00 - 00:04&lt;br /&gt;
&lt;br /&gt;
04:05 - 04:12&lt;br /&gt;
&lt;br /&gt;
07:51 - 07:57 ] &lt;br /&gt;
|  | '''Dimensions and Measuring Units '''is the next tutorial.&lt;br /&gt;
&lt;br /&gt;
In this, we’ll learn about measuring '''units''' and''' '''width &amp;amp; height properties in '''CSS.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of Box Model&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00 - 00:03&lt;br /&gt;
&lt;br /&gt;
01:27 - 01:36&lt;br /&gt;
&lt;br /&gt;
09:57 - 10:02 ] &lt;br /&gt;
|  | The next tutorial is '''Box Model''', in which we’ll learn about '''CSS''' '''Box Model '''and its '''layers'''.&lt;br /&gt;
&lt;br /&gt;
We will also learn about the '''Box sizing.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of Background&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00 - 00:03&lt;br /&gt;
&lt;br /&gt;
04:26 - 04:36&lt;br /&gt;
&lt;br /&gt;
05:53 - 05:57 ] &lt;br /&gt;
|  | Next tutorial is '''Background.'''&lt;br /&gt;
&lt;br /&gt;
In this tutorial we'll learn how to set the''' background '''properties of an '''element '''in''' CSS.'''&lt;br /&gt;
&lt;br /&gt;
Like '''background-color, background-image, background-repeat,''' etc.&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of Text Properties&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00 - 00:04&lt;br /&gt;
&lt;br /&gt;
02:28 - 02:42] &lt;br /&gt;
|  | After this, comes '''Text Properties.'''&lt;br /&gt;
&lt;br /&gt;
In this tutorial we’ll learn how to '''set''' the '''Text '''properties to '''format''' and '''style''' the '''text''' '''elements.'''&lt;br /&gt;
&lt;br /&gt;
Like '''color, alignment,''' etc.&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of Font properties&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00 - 00:04&lt;br /&gt;
&lt;br /&gt;
10:55 - 11:09 ] &lt;br /&gt;
|  | Next tutorial is '''Font properties'''.&lt;br /&gt;
&lt;br /&gt;
In this we’ll learn about '''Font properties''' of an '''element '''to '''style''' the '''font''' of the '''text.'''&lt;br /&gt;
&lt;br /&gt;
Like '''font-style, font-size, font-family,''' etc.&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of Display property&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00 - 00:06&lt;br /&gt;
&lt;br /&gt;
03:57 - 04:03] &lt;br /&gt;
|  | The tutorial named '''Display''' '''property '''is next in the series.&lt;br /&gt;
&lt;br /&gt;
In this we’ll see how to display''' '''an '''element''' in '''CSS.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of Float and Overflow&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00 - 00:04&lt;br /&gt;
&lt;br /&gt;
04:18 - 04:27&lt;br /&gt;
&lt;br /&gt;
11:06 - 11:10 ] &lt;br /&gt;
|  | Next tutorial is '''Float''' '''and''' '''Overflow.'''&lt;br /&gt;
&lt;br /&gt;
Here, we’ll learn about '''Float''' &amp;amp; '''Clear '''properties of an '''element '''in''' CSS.'''&lt;br /&gt;
&lt;br /&gt;
We’ll also learn '''Overflow '''property.&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of Link&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00 - 00:04&lt;br /&gt;
&lt;br /&gt;
06:11 - 06:25] &lt;br /&gt;
|  | After this is '''Link.'''&lt;br /&gt;
&lt;br /&gt;
In this, we can '''style links''' by applying different properties to all the four states of '''link.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of List&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00 - 00:04&lt;br /&gt;
&lt;br /&gt;
02:20 - 02:34] &lt;br /&gt;
|  | Next tutorial is '''List'''.&lt;br /&gt;
&lt;br /&gt;
In this we’ll learn about '''list''' properties to '''style''' and '''format lists.'''&lt;br /&gt;
&lt;br /&gt;
Like''' type, background-color, '''etc&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of Table&lt;br /&gt;
&lt;br /&gt;
[Video - Table: 00:00 - 00:02&lt;br /&gt;
&lt;br /&gt;
Video - Advanced Table Design: 00:00 - 00:04&lt;br /&gt;
&lt;br /&gt;
Video - Advanced Table Design: 03:35 - 03:43 ] &lt;br /&gt;
|  | '''Table '''and''' Advanced Table Design''' in '''CSS''' are next tutorial in this series.&lt;br /&gt;
&lt;br /&gt;
They will teach us to '''style''' and '''format tables''' using '''CSS''' '''table''' properties.&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of Forms&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00 - 00:04&lt;br /&gt;
&lt;br /&gt;
11:49 - 12:03 ] &lt;br /&gt;
|  | Next tutorial is '''Forms'''.&lt;br /&gt;
&lt;br /&gt;
In this we’ll learn to '''style''' and '''format forms '''using various''' CSS properties.'''&lt;br /&gt;
&lt;br /&gt;
Like '''border''', '''background-color, padding, '''etc.&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of Counters&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00 - 00:06&lt;br /&gt;
&lt;br /&gt;
06:45 - 06:58&lt;br /&gt;
|  | The tutorial named '''Counters '''is next in the series.&lt;br /&gt;
&lt;br /&gt;
With the help of this tutorial, we will learn to number '''elements''' automatically in a '''webpage.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of Multi-column Layout&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00 - 00:06&lt;br /&gt;
&lt;br /&gt;
4:04 - 4:17&lt;br /&gt;
&lt;br /&gt;
|  | Next tutorial is '''Multi-column Layout.'''&lt;br /&gt;
&lt;br /&gt;
In this tutorial, learners can create '''Multi-column Layouts '''of their''' webpages.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Glimpse of Web layout&lt;br /&gt;
&lt;br /&gt;
[Video:&lt;br /&gt;
&lt;br /&gt;
00:00-00:05&lt;br /&gt;
&lt;br /&gt;
7:35 - 07:49&lt;br /&gt;
|  | The last tutorial is '''Web layout.'''&lt;br /&gt;
&lt;br /&gt;
In this, learners will be able to design and structure '''web pages '''with proper '''web layout.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Only narration&lt;br /&gt;
|  | With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
Let us summarize.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Summary &lt;br /&gt;
|  | In this tutorial, we have learnt:&lt;br /&gt;
&lt;br /&gt;
* About '''CSS''' and&lt;br /&gt;
* The tutorials covered in this series&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: About Spoken Tutorial project&lt;br /&gt;
|  | The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Spoken Tutorial Workshops&lt;br /&gt;
|  | The Spoken Tutorial Project team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide:&lt;br /&gt;
&lt;br /&gt;
Answers for THIS Spoken Tutorial&lt;br /&gt;
|  | Do you have questions in THIS Spoken Tutorial?&lt;br /&gt;
&lt;br /&gt;
Please visit this site.&lt;br /&gt;
&lt;br /&gt;
Choose the minute and second where you have the question&lt;br /&gt;
&lt;br /&gt;
Explain your question briefly&lt;br /&gt;
&lt;br /&gt;
The Spoken Tutorial project will ensure an answer&lt;br /&gt;
&lt;br /&gt;
You will have to register to ask questions&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide:&lt;br /&gt;
&lt;br /&gt;
Forum for specific questions:&lt;br /&gt;
&lt;br /&gt;
|  | The Spoken Tutorial forum is for specific questions on this tutorial.&lt;br /&gt;
&lt;br /&gt;
Please do not post unrelated and general questions on them.&lt;br /&gt;
&lt;br /&gt;
This will help reduce the clutter.&lt;br /&gt;
&lt;br /&gt;
With less clutter, we can use these discussions as instructional material.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Acknowledgement&lt;br /&gt;
|  | Spoken Tutorial project is funded by Ministry of Education (MoE), Govt. of India.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Thanks&lt;br /&gt;
|  | This is Neha Solanki from IIT Bombay.&lt;br /&gt;
&lt;br /&gt;
Thank you for watching.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Rust/C2/Functions-and-Returning-value-from-function-using-Rust/English</id>
		<title>Rust/C2/Functions-and-Returning-value-from-function-using-Rust/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Rust/C2/Functions-and-Returning-value-from-function-using-Rust/English"/>
				<updated>2021-02-02T06:15:06Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Functions and Returning Value from Functions&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: Rust, cargo, function, rs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Welcome to the spoken tutorial on “'''Functions and Returning Value from Functions '''in''' Rust'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn to:&lt;br /&gt;
* Create a '''function'''&lt;br /&gt;
* Create a '''parameterized function'''&lt;br /&gt;
* '''Return''' a value from a '''function'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Rust''' version 1.47.0&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should be familiar with '''compiling''' and '''running Rust''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite '''Rust''' tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The file used in this tutorial is available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the file.&lt;br /&gt;
* Make a copy and then use it for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide Functions:&lt;br /&gt;
|| &lt;br /&gt;
* '''Function '''is a block of organised '''code''', used to perform a single related action.&lt;br /&gt;
* '''Functions''' provide better modularity for our application and&lt;br /&gt;
* High degree of code reusability&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us now take an example to understand '''functions''' better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press '''Ctrl+Alt+T '''keys&lt;br /&gt;
|| Open the '''terminal''' by pressing '''Ctrl, Alt''' and '''T''' keys simultaneously on the keyboard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ensure that you have '''root permissions''' to run the '''commands'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Here onwards, please remember to press the '''Enter''' key after typing each '''command'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd Desktop/MyRustProject&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Using '''cd''' command go to the '''Rust''' practice folder which we have created earlier.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;cargo new functions [Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Let us create a new '''project''' named '''functions.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type the '''command''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Welcome Page -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Folder -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
functions&lt;br /&gt;
|| Open the created '''project''' by clicking on the '''Open folder''' link in the '''Welcome page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Browse and locate the folder “'''functions'''”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK '''button at the top right corner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click on '''functions'''&lt;br /&gt;
|| Under the '''EXPLORER''' section, expand the '''project''' folder “'''functions'''” by clicking on it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Expand '''src '''and click on '''main.rs'''&lt;br /&gt;
|| Then expand '''src''' and open the '''main.rs''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor - main.rs] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
display();&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn display(){&lt;br /&gt;
&lt;br /&gt;
println!(“Spoken Tutorial”);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''fn display()'''&lt;br /&gt;
|| Here, we are creating a new '''function''' named '''display.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''println!(“Spoken Tutorial”);'''&lt;br /&gt;
|| And, here we are printing the text '''Spoken Tutorials '''in the '''function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''display();'''&lt;br /&gt;
|| To invoke the created '''function''', we need to make a '''function call'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, the '''display function''' is being '''called''' here.''' '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cd functions '''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| The '''Cargo project''' is created now.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Navigate inside the '''Cargo project functions '''using the '''cd command.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Run''' the '''project'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial'''&lt;br /&gt;
|| We see the text '''Spoken Tutorial''' printed in the '''terminal'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| So far, we have successfully written a basic '''function''' and have invoked it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us learn about '''parameterized function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor - main.rs] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
display(1);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn display(a:i32){&lt;br /&gt;
&lt;br /&gt;
println!(“I’m getting {} from main function.”, a);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''fn display(a:i32)'''&lt;br /&gt;
|| Here, we are '''passing''' a '''parameter''' to the '''display function''' and we’ve named it as '''a'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''println!(“I’m getting {} from the main function.”, a);'''&lt;br /&gt;
|| Here we’re trying to print the value which is being '''passed''' as a '''parameter''' to the '''function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''display(1);'''&lt;br /&gt;
|| As the '''function''' accepts a '''parameter, '''we’re''' passing''' an '''i32''' value, say 1, here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| And '''run''' the '''project'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''I’m getting 1 from the main function.'''&lt;br /&gt;
|| Now we can see that the value 1 which is being '''passed, '''is printed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| So now, we have successfully written a '''parameterized function''' and have invoked it by '''passing''' a '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next let us learn about '''returning''' a value from a '''function'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor - main.rs] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
println!(“The result is {}”,sum(1,2));&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn sum(a:i32, b:i32) -&amp;gt; i32{&lt;br /&gt;
&lt;br /&gt;
a+b&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''fn sum(a:i32, b:i32) -&amp;gt; i32'''&lt;br /&gt;
|| Here, we are '''passing a''' and '''b''' as '''parameters''' to the '''sum function.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''function '''should '''return '''the added value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, we are mentioning the '''type''' of value which would be '''returned''' after the arrow. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''a+b'''&lt;br /&gt;
|| In the '''function '''body we are adding the two numbers which are being '''passed''' as '''parameters'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''sum(1,2));'''&lt;br /&gt;
|| As the '''function '''accepts 2 '''parameters''', we are '''passing''' two values and the '''function returns''' the result.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''println!(“The result is {}”,sum(1,2));'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| Here, using the '''print statement''' we are printing it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''returned''' value would be replaced by the '''format specifier'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Run''' the '''project'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''The result is 3'''&lt;br /&gt;
|| We can see''' '''the '''sum''' being '''returned''' by the '''function''' and the result being displayed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Modify:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn sum(a:i32, b:i32) -&amp;gt; i32{&lt;br /&gt;
&lt;br /&gt;
a+b'''&amp;lt;nowiki&amp;gt;;&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Now, add a '''semicolon''' at the end of '''b.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Run''' the '''project'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] &amp;lt;/nowiki&amp;gt;Highlight:&lt;br /&gt;
&lt;br /&gt;
'''Consider removing this semicolon'''&lt;br /&gt;
|| This time we get an error, '''Consider removing this semicolon.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because it is being considered as a '''statement''' and not as a '''return''' value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to '''return''' the value directly without using the '''return keyword '''we need to remove the '''semicolon.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Modify:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn sum(a:i32, b:i32) -&amp;gt; i32{&lt;br /&gt;
&lt;br /&gt;
let z = a + b; &lt;br /&gt;
&lt;br /&gt;
z*10&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', replace the '''sum function''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;Editor] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''let z = a + b; '''&lt;br /&gt;
|| Here we have created a '''variable z '''and assigned '''a + b''' to it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;Editor] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''z*10'''&lt;br /&gt;
|| Here, we modify the '''variable''' and '''return''' the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice that there is no '''semicolon'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So the value will be '''returned '''correctly.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Run''' the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] &amp;lt;/nowiki&amp;gt;Highlight:&lt;br /&gt;
&lt;br /&gt;
'''The result is 30'''&lt;br /&gt;
|| Now we can see''' '''the value being '''returned''' by the '''function''' and the result being displayed correctly.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[&amp;lt;/nowiki&amp;gt;Editor] Highlight:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''let z = a + b; '''&lt;br /&gt;
&lt;br /&gt;
'''z*10'''&lt;br /&gt;
|| Here though the '''code''' works fine it is not properly readable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because we have a '''statement''' and value being '''returned.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Modify:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn sum(a:i32, b:i32) -&amp;gt; i32{&lt;br /&gt;
&lt;br /&gt;
let z = a + b; &lt;br /&gt;
&lt;br /&gt;
return z*10;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| To make it readable, we will modify our '''function''' a little bit.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Add a '''return keyword''' before '''z*10 '''and add a '''semicolon''' after '''z*10'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Run''' the project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] &amp;lt;/nowiki&amp;gt;Highlight:&lt;br /&gt;
&lt;br /&gt;
'''The result is 30'''&lt;br /&gt;
|| Now we can see the value being '''returned''' by the '''function''' and the result being displayed correctly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So we have learnt to make the code readable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We also learnt different ways to '''return''' a value from a '''function.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt to:&lt;br /&gt;
* Create a '''function'''&lt;br /&gt;
* Create a '''parameterized function'''&lt;br /&gt;
* '''Return''' a value from a '''function'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment,&lt;br /&gt;
* Go to the project folder '''rust-assignment'''&lt;br /&gt;
* In the '''main.rs''' file&lt;br /&gt;
** Create a '''function''' that accepts a '''number '''as a''' parameter'''&lt;br /&gt;
** Print '''EVEN '''if the number is even&lt;br /&gt;
** Else print '''ODD'''&lt;br /&gt;
* '''Compile '''and '''execute '''the project.&lt;br /&gt;
* Observe the output in the '''Terminal'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education, Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| This is Jayesh signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Rust/C2/Control-Flow-in-Rust/English</id>
		<title>Rust/C2/Control-Flow-in-Rust/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Rust/C2/Control-Flow-in-Rust/English"/>
				<updated>2021-02-02T05:37:14Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Control-Flow&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: Rust, variables, if, else, else if, conditions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Welcome to the spoken tutorial on “'''Control-Flow '''in''' Rust'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about the:&lt;br /&gt;
* '''if/else control flow statements'''&lt;br /&gt;
* Different '''types''' of '''loops''' supported in '''Rust'''&lt;br /&gt;
* '''Syntax''' of all the '''control flow statements''' and their usage&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Rust''' version 1.47.0&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
&lt;br /&gt;
However, you may use any other '''editor''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
&lt;br /&gt;
* You should be familiar with '''compiling''' and '''running Rust''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite '''Rust''' tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The file used in this tutorial is available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the file.&lt;br /&gt;
* Make a copy and then use it for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow&lt;br /&gt;
|| &lt;br /&gt;
* '''Control flow''' means deciding whether to run a piece of code, based on a '''condition.'''&lt;br /&gt;
* This is an integral part of any '''programming language'''.&lt;br /&gt;
* This can be achieved using '''if''' and '''else statements'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Highlight]: &amp;lt;/nowiki&amp;gt;'''if expressions'''&lt;br /&gt;
|| &lt;br /&gt;
* '''if''' is the most common way to handle the '''flow''' of our code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Highlight]: &amp;lt;/nowiki&amp;gt;'''else if'''&lt;br /&gt;
|| &lt;br /&gt;
* We can use '''else if, '''if there are multiple '''conditions''' to be evaluated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow -1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| &lt;br /&gt;
* We can use '''if''' without '''else''', however '''else''' cannot be used without '''if'''.&lt;br /&gt;
* '''else''' is always preceded with an '''if statement'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow -2&lt;br /&gt;
|| &lt;br /&gt;
* Also, we can use one or more '''else if''' along with the''' if statement.'''&lt;br /&gt;
* Ensure that when you use''' else if, '''always follow it up with an '''else condition''' too. &lt;br /&gt;
* The code works fine even when we don’t end with an '''else statement.'''&lt;br /&gt;
* However, to maintain '''coding standards''' it is advised to use '''else condition''' when we are using '''else if'''&lt;br /&gt;
&lt;br /&gt;
Let us understand all this by using an example.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press '''Ctrl+Alt+T '''keys&lt;br /&gt;
|| Open the '''terminal''' by pressing '''Ctrl,Alt''' and '''T''' keys simultaneously on the keyboard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ensure that you have '''root permissions''' to '''run''' the '''commands'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Here onwards, please remember to press the '''Enter''' key after typing each '''command'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd Desktop/MyRustProject&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Using '''cd command''' go to the '''Rust''' practice folder which we created earlier.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cargo new '''control_flow'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Let us create a new '''project''' named '''control_flow.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type the '''command''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Open Visual Studio Code editor.&lt;br /&gt;
|| You may use any '''editor''' of your choice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will use '''Visual Studio Code editor''' for this demonstration.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Welcome Page -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Folder -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''control_flow'''&lt;br /&gt;
|| Open the created '''project''' by clicking on the '''Open folder''' link in the '''Welcome page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Browse and locate the folder “'''control_flow'''”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK''' button at the top right corner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click on '''control_flow'''&lt;br /&gt;
|| Under the '''EXPLORER''' section, expand the '''project''' folder “'''control_flow'''” by clicking on it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Expand '''src '''and click on '''main.rs'''&lt;br /&gt;
|| Then expand '''src''' and open the''' main.rs''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
let a = 30;&lt;br /&gt;
&lt;br /&gt;
let b = 20;&lt;br /&gt;
&lt;br /&gt;
if a&amp;gt;b{&lt;br /&gt;
&lt;br /&gt;
println!(“A is greater than B”);&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
println!(“B is greater than A”);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''If a&amp;gt;b'''&lt;br /&gt;
|| Here we are checking whether the '''condition a''' is greater than '''b''' or not.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''println!(“A is greater than B”);'''&lt;br /&gt;
|| When the '''condition''' is satisfied, the '''print statement''' inside the '''if block''' gets printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''else {'''&lt;br /&gt;
&lt;br /&gt;
'''println!(“B is greater than A”);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| If not, the '''print statement''' in the '''else block''' gets executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd '''control_flow'''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Go to the '''project''' folder '''control_flow '''using the '''cd command.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''cargo run.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''A is greater than B'''&lt;br /&gt;
|| The '''print statement''' in the '''if block''' is executed and printed, as the '''condition''' is satisfied.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Modify: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
let marks = 50;&lt;br /&gt;
&lt;br /&gt;
if marks&amp;gt;35{&lt;br /&gt;
&lt;br /&gt;
println!(“You are qualified!”);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', modify the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
i'''f(marks&amp;gt;35){'''&lt;br /&gt;
&lt;br /&gt;
'''println!(“You are qualified!”);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| Here, in this example, we are considering only the '''if condition'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the '''condition''' gets satisfied, the '''block''' gets executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, then nothing is printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Run''' the '''project'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''You are qualified!'''&lt;br /&gt;
|| As the '''condition (marks greater than 35)''' is satisfied, the '''block''' gets executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, we emphasise that only an '''if condition''' can exist without an '''else statement.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Modify: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
let a = 5;&lt;br /&gt;
&lt;br /&gt;
if a%2 == 0{&lt;br /&gt;
&lt;br /&gt;
println!(“Number is divisible by 2”);&lt;br /&gt;
&lt;br /&gt;
} else if a%3 == 0{&lt;br /&gt;
&lt;br /&gt;
println!(“Number is divisible by 3”);&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
println!(“Number is not divisible by 2 and 3”);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', let’s update the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the '''if - else if - else statement'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''if a%2 == 0{'''&lt;br /&gt;
&lt;br /&gt;
'''println!(“Number is divisible by 2”);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| Here, we are checking a '''condition if a % 2 == 0''' or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When this '''condition''' is satisfied, the''' if block''' gets executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When this '''condition''' fails, the '''else if block '''is checked'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''else if a%3 == 0{'''&lt;br /&gt;
&lt;br /&gt;
'''println!(“Number is divisible by 3”);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| '''else if block''' checks the '''condition if a % 3 == 0''' or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When this '''condition''' is satisfied, the '''else if block''' gets executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''else {'''&lt;br /&gt;
&lt;br /&gt;
'''println!(“Number is not divisible by 2 and 3”);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| When this '''condition''' also fails, the '''else block '''is executed.&lt;br /&gt;
&lt;br /&gt;
And prints this message as the above two '''conditions''' are not satisfied.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''cargo run.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Number is not divisible by 2 and 3'''&lt;br /&gt;
||'''Number is not divisible by 2 and 3 '''is printed because the above two '''conditions''' are not satisfied.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| That’s how the '''if - else if - else statements''' work in '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| Next, let’s learn about '''loops'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow - Loops&lt;br /&gt;
|| &lt;br /&gt;
* '''Loops''' are '''control structures''' that are repeatedly executed until a particular '''condition''' fails.&lt;br /&gt;
* That means, '''loops''' repeat a '''block''' of code '''n''' number of times until a particular '''condition '''fails.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow - Loops&lt;br /&gt;
|| &lt;br /&gt;
* There are two '''types''' of '''loops''' supported in '''Rust'''&lt;br /&gt;
** '''For loop''' and&lt;br /&gt;
** '''While loop'''&lt;br /&gt;
* Note: There is no''' do while loop''' in '''Rust'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us take an example and understand '''Loops''' better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
loop {&lt;br /&gt;
&lt;br /&gt;
println!(“Hello World!”);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Go back to the '''editor''' and replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''loop '''&lt;br /&gt;
|| '''loop''' is a '''keyword''' in '''Rust''' which iterates a '''block''' until it fails.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''cargo run.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] &amp;lt;/nowiki&amp;gt;Show:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Hello world'''&lt;br /&gt;
&lt;br /&gt;
''(being printed infinite times)''&lt;br /&gt;
|| We can see '''Hello World''' being printed infinite times, until the '''memory''' in the '''stack''' ends.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is an '''infinite loop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Press '''Ctrl + C''' keys to '''terminate''' this '''loop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Modify: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
loop {&lt;br /&gt;
&lt;br /&gt;
println!(“Hello, World!”);&lt;br /&gt;
&lt;br /&gt;
'''break;'''&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', modify the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''break;'''&lt;br /&gt;
|| Here, we are using '''break statements''' to break the execution of the '''loop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Run''' the project.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Hello, World!'''&lt;br /&gt;
|| Notice now, we can see''' Hello, World''' printed only once.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because the '''loop''' breaks after one '''execution'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can even have a '''condition check''' and break whenever the '''condition''' fails.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| This is the basic way to '''loop''' in '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, let us learn about '''while loop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
let mut a = 3;&lt;br /&gt;
&lt;br /&gt;
while a!=0 {&lt;br /&gt;
&lt;br /&gt;
println!(“{}”,a);&lt;br /&gt;
&lt;br /&gt;
a = a - 1;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''let mut a = 3;'''&lt;br /&gt;
|| Here we have initialized a '''mutable variable a''' and assigned the value '''3 '''to it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''while a!=0 {'''&lt;br /&gt;
|| After this, the '''while keyword''' is used to '''initialize''' a '''while loop.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''While keyword''' is followed by the '''condition a not equal to zero.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Until and unless the '''condition''' returns '''false,''' the '''block''' gets '''executed'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''println!(“{}”,a);'''&lt;br /&gt;
&lt;br /&gt;
'''a = a - 1;'''&lt;br /&gt;
|| Here we are printing the number and then reducing the value by''' 1.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Run''' the project and see the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3&lt;br /&gt;
&lt;br /&gt;
2&lt;br /&gt;
&lt;br /&gt;
1&lt;br /&gt;
|| So now, we have successfully '''executed''' the '''while loop'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only when the value of '''a''' is '''zero''' the '''condition''' returns '''false''' and the '''block''' will stop getting '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''0''' is not printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now let us learn about '''for loop.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''fn main(){'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;let arr = [2,3,5,7,11];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for value in arr.iter() {'''&lt;br /&gt;
&lt;br /&gt;
'''println!(“Value = {}”,value);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| In the '''editor''', replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;let arr = [2,3,5,7,11];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
|| Here we have '''initialized''' an '''array''' with few '''number elements''' in it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''for value in arr.iter() {'''&lt;br /&gt;
|| So here '''value '''means each and every '''number element''' present in the '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the first iteration, the value will be '''2.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And in the second iteration, the value will be '''3''' and so on.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Video Editing]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notify:&lt;br /&gt;
&lt;br /&gt;
https://doc.rust-lang.org/std/iter/index.html&lt;br /&gt;
|| '''Rust std module''' provides three forms of iteration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, we are using''' iter() method''' which iterates over the address of T. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, on '''iter method''' refer to the '''link'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In our example, The '''iter() method''' will iterate over all the values in the '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''println!(“Value = {}”,value);'''&lt;br /&gt;
|| And, in the '''block''' we are printing the value for each and every iteration.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Run''' the project.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Value = 2'''&lt;br /&gt;
&lt;br /&gt;
'''Value = 3'''&lt;br /&gt;
&lt;br /&gt;
'''Value = 5'''&lt;br /&gt;
&lt;br /&gt;
'''Value = 7'''&lt;br /&gt;
&lt;br /&gt;
'''Value = 11'''&lt;br /&gt;
|| The '''loop''' has '''executed''' successfully and printed all the values in the '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see the '''for loop''' has been '''executed''' once for each and every '''element''' in the '''array'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And on reaching the end of the '''array''', the '''for loop''' stopped '''executing'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| That’s how a '''for loop''' works in '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* '''if/else control flow statements'''&lt;br /&gt;
* Different '''types''' of '''loops''' and &lt;br /&gt;
* Their '''syntax''' and usage&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment,&lt;br /&gt;
* Go to the project folder '''rust-assignment'''&lt;br /&gt;
* In the '''main.rs''' file&lt;br /&gt;
** Create a '''array '''named '''n '''and assign '''10 '''random numbers to it&lt;br /&gt;
** '''Loop '''over the '''array '''and&lt;br /&gt;
** Count the number''' '''of '''even '''values and '''odd '''values&lt;br /&gt;
** Print the count of '''odd '''and '''even '''values&lt;br /&gt;
* '''Compile '''and '''execute '''the project.&lt;br /&gt;
* Observe the output in the '''Terminal'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education, Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| This is Jayesh signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Rust/C2/Control-Flow-in-Rust/English</id>
		<title>Rust/C2/Control-Flow-in-Rust/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Rust/C2/Control-Flow-in-Rust/English"/>
				<updated>2021-02-02T05:36:08Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Control-Flow&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: Rust, variables, if, else, else if, conditions&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Welcome to the spoken tutorial on “'''Control-Flow '''in''' Rust'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about the:&lt;br /&gt;
* '''if/else control flow statements'''&lt;br /&gt;
* Different '''types''' of '''loops''' supported in '''Rust'''&lt;br /&gt;
* '''Syntax''' of all the '''control flow statements''' and their usage&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Rust''' version 1.47.0&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
&lt;br /&gt;
However, you may use any other '''editor''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
&lt;br /&gt;
* You should be familiar with '''compiling''' and '''running Rust''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite '''Rust''' tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The file used in this tutorial is available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the file.&lt;br /&gt;
* Make a copy and then use it for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow&lt;br /&gt;
|| &lt;br /&gt;
* '''Control flow''' means deciding whether to run a piece of code, based on a '''condition.'''&lt;br /&gt;
* This is an integral part of any '''programming language'''.&lt;br /&gt;
* This can be achieved using '''if''' and '''else statements'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Highlight]: &amp;lt;/nowiki&amp;gt;'''if expressions'''&lt;br /&gt;
|| &lt;br /&gt;
* '''if''' is the most common way to handle the '''flow''' of our code.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Highlight]: &amp;lt;/nowiki&amp;gt;'''else if'''&lt;br /&gt;
|| &lt;br /&gt;
* We can use '''else if, '''if there are multiple '''conditions''' to be evaluated.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow -1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| &lt;br /&gt;
* We can use '''if''' without '''else''', however '''else''' cannot be used without '''if'''.&lt;br /&gt;
* '''else''' is always preceded with an '''if statement'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow -2&lt;br /&gt;
|| &lt;br /&gt;
* Also, we can use one or more '''else if''' along with the''' if statement.'''&lt;br /&gt;
* Ensure that when you use''' else if, '''always follow it up with an '''else condition''' too. &lt;br /&gt;
* The code works fine even when we don’t end with an '''else statement.'''&lt;br /&gt;
* However, to maintain '''coding standards''' it is advised to use '''else condition''' when we are using '''else if'''&lt;br /&gt;
&lt;br /&gt;
Let us understand all this by using an example.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press '''Ctrl+Alt+T '''keys&lt;br /&gt;
|| Open the '''terminal''' by pressing '''Ctrl,Alt''' and '''T''' keys simultaneously on the keyboard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ensure that you have '''root permissions''' to '''run''' the '''commands'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Here onwards, please remember to press the '''Enter''' key after typing each '''command'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd Desktop/MyRustProject&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Using '''cd command''' go to the '''Rust''' practice folder which we created earlier.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cargo new '''control_flow'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Let us create a new '''project''' named '''control_flow.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type the '''command''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Open Visual Studio Code editor.&lt;br /&gt;
|| You may use any '''editor''' of your choice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will use '''Visual Studio Code editor''' for this demonstration.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Welcome Page -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Folder -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''control_flow'''&lt;br /&gt;
|| Open the created '''project''' by clicking on the '''Open folder''' link in the '''Welcome page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Browse and locate the folder “'''control_flow'''”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK''' button at the top right corner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click on '''control_flow'''&lt;br /&gt;
|| Under the '''EXPLORER''' section, expand the '''project''' folder “'''control_flow'''” by clicking on it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Expand '''src '''and click on '''main.rs'''&lt;br /&gt;
|| Then expand '''src''' and open the''' main.rs''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
let a = 30;&lt;br /&gt;
&lt;br /&gt;
let b = 20;&lt;br /&gt;
&lt;br /&gt;
if a&amp;gt;b{&lt;br /&gt;
&lt;br /&gt;
println!(“A is greater than B”);&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
println!(“B is greater than A”);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''If a&amp;gt;b'''&lt;br /&gt;
|| Here we are checking whether the '''condition a''' is greater than '''b''' or not.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''println!(“A is greater than B”);'''&lt;br /&gt;
|| When the '''condition''' is satisfied, the '''print statement''' inside the '''if block''' gets printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''else {'''&lt;br /&gt;
&lt;br /&gt;
'''println!(“B is greater than A”);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| If not, the '''print statement''' in the '''else block''' gets executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd '''control_flow'''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Go to the '''project''' folder '''control_flow '''using the '''cd command.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''cargo run.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''A is greater than B'''&lt;br /&gt;
|| The '''print statement''' in the '''if block''' is executed and printed, as the '''condition''' is satisfied.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Modify: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
let marks = 50;&lt;br /&gt;
&lt;br /&gt;
if marks&amp;gt;35{&lt;br /&gt;
&lt;br /&gt;
println!(“You are qualified!”);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', modify the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
i'''f(marks&amp;gt;35){'''&lt;br /&gt;
&lt;br /&gt;
'''println!(“You are qualified!”);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| Here, in this example, we are considering only the '''if condition'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the '''condition''' gets satisfied, the '''block''' gets executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, then nothing is printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Run''' the '''project'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''You are qualified!'''&lt;br /&gt;
|| As the '''condition (marks greater than 35)''' is satisfied, the '''block''' gets executed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, we emphasise that only an '''if condition''' can exist without an '''else statement.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Modify: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
let a = 5;&lt;br /&gt;
&lt;br /&gt;
if a%2 == 0{&lt;br /&gt;
&lt;br /&gt;
println!(“Number is divisible by 2”);&lt;br /&gt;
&lt;br /&gt;
} else if a%3 == 0{&lt;br /&gt;
&lt;br /&gt;
println!(“Number is divisible by 3”);&lt;br /&gt;
&lt;br /&gt;
} else {&lt;br /&gt;
&lt;br /&gt;
println!(“Number is not divisible by 2 and 3”);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', let’s update the '''code''' as shown. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the '''if-elseif-else statement'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''if a%2 == 0{'''&lt;br /&gt;
&lt;br /&gt;
'''println!(“Number is divisible by 2”);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| Here, we are checking a '''condition if a % 2 == 0''' or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When this '''condition''' is satisfied, the''' if block''' gets executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When this '''condition''' fails, the '''else if block '''is checked'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''else if a%3 == 0{'''&lt;br /&gt;
&lt;br /&gt;
'''println!(“Number is divisible by 3”);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| '''else if block''' checks the '''condition if a % 3 == 0''' or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When this '''condition''' is satisfied, the '''else if block''' gets executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''else {'''&lt;br /&gt;
&lt;br /&gt;
'''println!(“Number is not divisible by 2 and 3”);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| When this '''condition''' also fails, the '''else block '''is executed.&lt;br /&gt;
&lt;br /&gt;
And prints this message as the above two '''conditions''' are not satisfied.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''cargo run.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Number is not divisible by 2 and 3'''&lt;br /&gt;
||'''Number is not divisible by 2 and 3 '''is printed because the above two '''conditions''' are not satisfied.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| That’s how the '''if - else if - else statements''' work in '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| Next, let’s learn about '''loops'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow - Loops&lt;br /&gt;
|| &lt;br /&gt;
* '''Loops''' are '''control structures''' that are repeatedly executed until a particular '''condition''' fails.&lt;br /&gt;
* That means, '''loops''' repeat a '''block''' of code '''n''' number of times until a particular '''condition '''fails.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Control Flow - Loops&lt;br /&gt;
|| &lt;br /&gt;
* There are two '''types''' of '''loops''' supported in '''Rust'''&lt;br /&gt;
** '''For loop''' and&lt;br /&gt;
** '''While loop'''&lt;br /&gt;
* Note: There is no''' do while loop''' in '''Rust'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us take an example and understand '''Loops''' better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
loop {&lt;br /&gt;
&lt;br /&gt;
println!(“Hello World!”);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| Go back to the '''editor''' and replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''loop '''&lt;br /&gt;
|| '''loop''' is a '''keyword''' in '''Rust''' which iterates a '''block''' until it fails.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''cargo run.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] &amp;lt;/nowiki&amp;gt;Show:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Hello world'''&lt;br /&gt;
&lt;br /&gt;
''(being printed infinite times)''&lt;br /&gt;
|| We can see '''Hello World''' being printed infinite times, until the '''memory''' in the '''stack''' ends.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is an '''infinite loop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Press '''Ctrl + C''' keys to '''terminate''' this '''loop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Modify: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
loop {&lt;br /&gt;
&lt;br /&gt;
println!(“Hello, World!”);&lt;br /&gt;
&lt;br /&gt;
'''break;'''&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', modify the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''break;'''&lt;br /&gt;
|| Here, we are using '''break statements''' to break the execution of the '''loop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Run''' the project.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Hello, World!'''&lt;br /&gt;
|| Notice now, we can see''' Hello, World''' printed only once.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because the '''loop''' breaks after one '''execution'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can even have a '''condition check''' and break whenever the '''condition''' fails.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| This is the basic way to '''loop''' in '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next, let us learn about '''while loop'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
let mut a = 3;&lt;br /&gt;
&lt;br /&gt;
while a!=0 {&lt;br /&gt;
&lt;br /&gt;
println!(“{}”,a);&lt;br /&gt;
&lt;br /&gt;
a = a - 1;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''let mut a = 3;'''&lt;br /&gt;
|| Here we have initialized a '''mutable variable a''' and assigned the value '''3 '''to it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''while a!=0 {'''&lt;br /&gt;
|| After this, the '''while keyword''' is used to '''initialize''' a '''while loop.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''While keyword''' is followed by the '''condition a not equal to zero.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Until and unless the '''condition''' returns '''false,''' the '''block''' gets '''executed'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''println!(“{}”,a);'''&lt;br /&gt;
&lt;br /&gt;
'''a = a - 1;'''&lt;br /&gt;
|| Here we are printing the number and then reducing the value by''' 1.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Run''' the project and see the output.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3&lt;br /&gt;
&lt;br /&gt;
2&lt;br /&gt;
&lt;br /&gt;
1&lt;br /&gt;
|| So now, we have successfully '''executed''' the '''while loop'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Only when the value of '''a''' is '''zero''' the '''condition''' returns '''false''' and the '''block''' will stop getting '''executed'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So '''0''' is not printed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Now let us learn about '''for loop.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''fn main(){'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;let arr = [2,3,5,7,11];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
'''for value in arr.iter() {'''&lt;br /&gt;
&lt;br /&gt;
'''println!(“Value = {}”,value);'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| In the '''editor''', replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;nowiki&amp;gt;let arr = [2,3,5,7,11];&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
|| Here we have '''initialized''' an '''array''' with few '''number elements''' in it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''for value in arr.iter() {'''&lt;br /&gt;
|| So here '''value '''means each and every '''number element''' present in the '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the first iteration, the value will be '''2.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And in the second iteration, the value will be '''3''' and so on.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Video Editing]:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notify:&lt;br /&gt;
&lt;br /&gt;
https://doc.rust-lang.org/std/iter/index.html&lt;br /&gt;
|| '''Rust std module''' provides three forms of iteration.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, we are using''' iter() method''' which iterates over the address of T. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, on '''iter method''' refer to the '''link'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In our example, The '''iter() method''' will iterate over all the values in the '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''println!(“Value = {}”,value);'''&lt;br /&gt;
|| And, in the '''block''' we are printing the value for each and every iteration.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| '''Run''' the project.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Value = 2'''&lt;br /&gt;
&lt;br /&gt;
'''Value = 3'''&lt;br /&gt;
&lt;br /&gt;
'''Value = 5'''&lt;br /&gt;
&lt;br /&gt;
'''Value = 7'''&lt;br /&gt;
&lt;br /&gt;
'''Value = 11'''&lt;br /&gt;
|| The '''loop''' has '''executed''' successfully and printed all the values in the '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see the '''for loop''' has been '''executed''' once for each and every '''element''' in the '''array'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And on reaching the end of the '''array''', the '''for loop''' stopped '''executing'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| That’s how a '''for loop''' works in '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* '''if/else control flow statements'''&lt;br /&gt;
* Different '''types''' of '''loops''' and &lt;br /&gt;
* Their '''syntax''' and usage&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment,&lt;br /&gt;
* Go to the project folder '''rust-assignment'''&lt;br /&gt;
* In the '''main.rs''' file&lt;br /&gt;
** Create a '''array '''named '''n '''and assign '''10 '''random numbers to it&lt;br /&gt;
** '''Loop '''over the '''array '''and&lt;br /&gt;
** Count the number''' '''of '''even '''values and '''odd '''values&lt;br /&gt;
** Print the count of '''odd '''and '''even '''values&lt;br /&gt;
* '''Compile '''and '''execute '''the project.&lt;br /&gt;
* Observe the output in the '''Terminal'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education, Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| This is Jayesh signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Rust/C2/Data-Types-in-Rust/English</id>
		<title>Rust/C2/Data-Types-in-Rust/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Rust/C2/Data-Types-in-Rust/English"/>
				<updated>2021-02-02T05:01:45Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Data Types&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: &lt;br /&gt;
&lt;br /&gt;
Keywords: Rust, variables, data types, scalar, integers, float, boolean, character&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Welcome to the spoken tutorial on “'''Data Types '''in''' Rust'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn about:&lt;br /&gt;
* '''Supported Data Types'''&lt;br /&gt;
* '''Scalar Data Types '''&lt;br /&gt;
* '''Compound Data Types '''and&lt;br /&gt;
* Its '''types''' in '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Rust''' version 1.47.0&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''editor''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
&lt;br /&gt;
* You should be familiar with '''compiling''' and '''running Rust''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite '''Rust''' tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The file used in this tutorial is available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the file.&lt;br /&gt;
* Make a copy and then use it for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide:''' Data Types in Rust'''&lt;br /&gt;
|| &lt;br /&gt;
* Every value in '''Rust '''is of a certain '''Type.'''&lt;br /&gt;
* It tells the '''compiler '''what kind of '''data '''is being specified.&lt;br /&gt;
* This helps the '''compiler '''know how to work with that '''data'''.&lt;br /&gt;
* And, helps optimize for efficient &amp;amp; faster '''runtime execution.'''&lt;br /&gt;
* There are a number of '''in-built Data Types''' in '''Rust'''. &lt;br /&gt;
&lt;br /&gt;
We’ll see them now.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: '''Data Types''' in '''Rust'''&lt;br /&gt;
|| There are 2 major '''data types''' namely '''scalar '''and '''compound.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Only narration]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Do remember that '''Rust '''is a statically typed language.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That means it checks what are the '''types''' of '''variables''' at '''compile''' time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''compiler '''can usually infer what '''data type''' is used based on the value and improve '''runtime''' efficiency.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Scalar Types&lt;br /&gt;
|| &lt;br /&gt;
* A '''Scalar Data Type''' represents a single value. &lt;br /&gt;
* '''Rust''' has four primary '''scalar data types'''&lt;br /&gt;
** '''Integers'''&lt;br /&gt;
** '''Float'''&lt;br /&gt;
** '''Boolean'''&lt;br /&gt;
** '''Character'''&lt;br /&gt;
&lt;br /&gt;
Now let us take an example of a '''scalar data type''' and see how it works in '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press '''Ctrl+Alt+T '''keys&lt;br /&gt;
|| Open the '''terminal''' by pressing '''Ctrl,Alt''' and '''T''' keys simultaneously on the keyboard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ensure that you have '''root permissions''' to '''run''' the '''commands'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Here onwards, please remember to press the '''Enter''' key after typing each '''command'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd Desktop/MyRustProject&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Using '''cd''' command go to the '''Rust''' practice folder which we created earlier.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;cargo new scalar_types [Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Let us create a new '''project''' named '''scalar_types.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type the '''command''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Open Visual Studio Code editor.&lt;br /&gt;
|| You may use any '''editor''' of your choice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will use '''Visual Studio Code editor '''for this demonstration.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Welcome Page -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Folder -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
scalar_types&lt;br /&gt;
|| Open the created '''project''' by clicking on the '''Open folder''' link in the '''Welcome page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Browse and locate the folder “'''scalar_types'''”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''Open''' button at the top right corner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click on '''scalar_types'''&lt;br /&gt;
|| Under the '''EXPLORER''' section, expand the '''project''' folder “'''scalar_types'''” by clicking on it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Expand '''src '''and click on '''main.rs'''&lt;br /&gt;
|| Then expand '''src''' and then open '''main.rs''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn main() {&lt;br /&gt;
&lt;br /&gt;
let mut a = 2147483647;&lt;br /&gt;
&lt;br /&gt;
a = a + 1;&lt;br /&gt;
&lt;br /&gt;
print!(“The value of a is {}”,a);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''let mut a = 2147483647; '''&lt;br /&gt;
|| Here the '''variable a''' is declared with value '''2147483647, '''which is an '''integer variable'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default, the '''integer variable''' is '''32-bit (i32)''', which is a '''signed integer type''' and can hold both '''+ve''' and '''-ve''' values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Rust '''even offers '''unsigned integers type'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can explicitly '''typecast''' to '''u32''' if you don’t want the value to go below '''zero'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So the maximum value it can take is '''2147483647 '''which is equal to '''2 power 32 minus 1 .'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''a = a + 1;'''&lt;br /&gt;
|| Next we are experimenting by trying to add 1 to the maximum value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''print!(&amp;quot;The value of a is {}&amp;quot;,a);'''&lt;br /&gt;
|| Using the '''print method''' we are printing the '''variable’s''' value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd '''scalar_types '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Go to the '''project''' folder '''scalar_types '''using the '''cd command.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''cargo run'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''attempt to add with overflow'''&lt;br /&gt;
|| Here, we see an error - '''attempt to add with overflow.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo build '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| If we try to '''compile''' using '''cargo build, '''it '''compiles''' successfully.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''attempt to add with overflow'''&lt;br /&gt;
|| But when we '''run''' the '''project''' we get an error as the addition takes place in '''runtime.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Only narration]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| This reminds us that the '''integer variable''' is '''32-bit'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So the maximum value it can take is '''2147483647 '''which a '''32-bit integer''' can store. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So if we add more to it, it is an '''overflow'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In order to overcome this error, we need to '''typecast''' the '''variable''' to a '''64-bit integer''' while '''initializing'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
let''' '''mut''' '''a''':i64''' = 1;&lt;br /&gt;
|| Update the '''variable declaration''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
let''' '''mut''' '''a''':i64''' = 1;&lt;br /&gt;
|| Here we are telling the '''compiler''' that the '''initialized variable''' is of '''64-Bit'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''cargo run'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The value of a is 2147483648&lt;br /&gt;
|| We can see the output. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''initialized '''value is incremented by 1 and is successfully displayed in the '''terminal'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Float&lt;br /&gt;
|| &lt;br /&gt;
* '''Rust''' has 2 primitive '''types''' for '''Float '''similar to '''integers''' &lt;br /&gt;
*'''f32 and f64''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;Slide: Float [show] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let a = 1.0; &lt;br /&gt;
|| &lt;br /&gt;
* Here the numbers are with decimal points.&lt;br /&gt;
*For '''float''', by default '''Rust''' allocates '''64-bits'''&lt;br /&gt;
* Here for '''let a = 1.0''' '''Rust''' allocates '''64-bits''' of memory.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Float &amp;lt;nowiki&amp;gt;[show]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let a''':f32''' = 1.0;&lt;br /&gt;
|| &lt;br /&gt;
* If you want '''Rust''' to allocate '''32-bits '''of''' memory''', we need to explicitly '''typecast '''to '''32-bits '''using''' f32'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Boolean&lt;br /&gt;
|| &lt;br /&gt;
* As in most '''programming languages''', in '''Rust''' also we have two possible values for '''boolean'''&lt;br /&gt;
* '''True '''and''' False'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Boolean&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[show]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let a:bool = true; &lt;br /&gt;
|| &lt;br /&gt;
* To '''typecast''' a '''boolean variable''' we use '''bool'''&lt;br /&gt;
* Typically these '''variables''' would be used whenever we set '''flags'''.&lt;br /&gt;
* Depending upon the state of '''flag''' we allow further '''execution''' of the '''program'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Character&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
let a:char = ‘z’;&lt;br /&gt;
|| &lt;br /&gt;
* So far we have worked only with numbers.&lt;br /&gt;
* '''Rust '''also supports letters.&lt;br /&gt;
* The '''Character type''' is the most primitive alphabetic '''type'''.&lt;br /&gt;
* The value should be '''declared''' between single quotes&lt;br /&gt;
* Here’s an example of how a '''character''' can be '''declared'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| Next, let’s learn about '''Compound Types.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Compound Data Types&lt;br /&gt;
|| &lt;br /&gt;
* '''Compound Types '''group multiple values of other '''types''' into one '''type'''.&lt;br /&gt;
* '''Rust''' has two primitive '''Compound types '''namely, '''Tuples''' and '''Arrays.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Side: Tuples&lt;br /&gt;
|| &lt;br /&gt;
* A '''Tuple''' is a general way of grouping together some number of other values.&lt;br /&gt;
* A '''Tuple''' can contain a variety of '''types'''.&lt;br /&gt;
* We create '''Tuples''' by writing a comma separated list of values within parentheses.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Side: Tuples&lt;br /&gt;
|| &lt;br /&gt;
* '''Destructing''' is a process where a '''Tuple''' is broken into a number of parts using '''pattern matching'''.&lt;br /&gt;
* Also we can directly access a '''Tuple element''' using a '''period'''.&lt;br /&gt;
&lt;br /&gt;
Now let’s work on an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;cd .. [Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Using '''cd command''' go to the '''Rust''' practice folder.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;cargo new tuples [Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Let us create a new '''project''' named '''tuples.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type the '''command''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Open Visual Studio Code editor.&lt;br /&gt;
|| Switch to the '''editor'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Help -&amp;gt; Welcome&lt;br /&gt;
|| Go to the '''Help''' menu and select '''Welcome.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We are back to the '''Welcome page '''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Welcome Page -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Folder -&amp;gt; tuples&lt;br /&gt;
|| Open the created '''project''' by clicking on the '''Open folder''' link in the '''Welcome page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Browse and locate the folder “'''tuples'''”.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK '''button at the top right corner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Click on '''tuples'''&lt;br /&gt;
|| Under the '''EXPLORER''' section, expand the '''project''' folder “'''tuples'''” by clicking on it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Expand '''src '''and click on '''main.rs'''&lt;br /&gt;
|| Then expand '''src''' and open the '''main.rs''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn main() {&lt;br /&gt;
&lt;br /&gt;
let tup:(i32,i32,i32) = (1,2,3);&lt;br /&gt;
&lt;br /&gt;
let (x,y,z) = tup;&lt;br /&gt;
&lt;br /&gt;
println!(‘x - {} , Y - {} , Z - {}‘, x,y,z);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
let tup:(i32,i32,i32) = (1,2,3);&lt;br /&gt;
|| Here, we first '''declare''' a '''tuple''' with three '''32-bit integer '''values 1,2,3 respectively.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
let (x,y,z) = tup;&lt;br /&gt;
|| Then we declare 3 meaningful '''variables - x, y''' and '''z''' and then assign the '''variables''' to the already created '''tuple'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
println!(‘x - {} , Y - {} , Z - {}‘, x,y,z);&lt;br /&gt;
|| Using the '''print method''' we will print the respective values.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cd tuples''' '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Go to the '''project''' folder '''tuples '''using the '''cd command.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''cargo run'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''x - 1 , Y - 2 , Z - 3'''&lt;br /&gt;
|| We can see the output as '''x=1, y=2''' and '''z=3'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us understand what exactly is happening here.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
let tup:(i32,i32,i32) = (1,2,3);&lt;br /&gt;
|| '''tup''' is a '''variable''' which has three values '''1, 2 '''and '''3'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
let (x,y,z) = tup;&lt;br /&gt;
|| We need to give these 3 values meaningful '''variable''' names.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So we have '''declared x, y''' and '''z''' and have assigned the '''tuple'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We call this as '''Destructing '''a '''tuple'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
let a = tup.0;&lt;br /&gt;
&lt;br /&gt;
println!(“A = {}”,a);&lt;br /&gt;
|| Type this '''code''' inside the '''main function''' below the last line as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
let a = tup.0;&lt;br /&gt;
|| '''tup.0 - '''this is how we directly access a '''tuple''' using '''period'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The index of the '''tuple''' starts from zero.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''cargo run'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
x - 1 , Y - 2 , Z - 3 A = 1&lt;br /&gt;
|| We see the output of '''A, x, y''' and '''z'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Arrays&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|| Another way of storing multiple values is using an '''array'''.&lt;br /&gt;
&lt;br /&gt;
* Unlike a '''tuple''', every '''element''' in an '''array''' should have the same '''data type'''.&lt;br /&gt;
* '''Arrays''' in '''Rust''' are different as compared to other '''programming languages''' &lt;br /&gt;
* As they have a fixed length.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Arrays&lt;br /&gt;
|| &lt;br /&gt;
* Once '''declared''' they cannot grow or shrink in size.&lt;br /&gt;
* In '''Arrays''', the '''data''' is allocated in a stack rather than a heap and has a fixed number of '''elements'''.&lt;br /&gt;
&lt;br /&gt;
Let us take an example and understand this better.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;let numbers = [1,2,3,4,5];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;println!(“First Value = {}”, numbers[0]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| In the '''editor''', type this code inside the '''main function''' below the last line as shown.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;let numbers = [1,2,3,4,5];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, we have '''declared''' a '''variable''' with the name '''numbers. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then assigned an '''array''' with values of '''integer data type'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;println!(“First Element = {}”, numbers[0]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Here, we are printing the first value by accessing the '''array '''starting with '''index 0'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''cargo run'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
First Value = 1&lt;br /&gt;
|| We see the output as the first value in the '''array''' is displayed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| Switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Type: &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;println!(“12th Element = {}”, numbers[11]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type this '''code''', inside the '''main function''' below the last line &lt;br /&gt;
&lt;br /&gt;
as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;println!(“12th Element = {}”, numbers[11]);&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| We now have 5 values in the '''array.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us try to access the '''nth element''' greater than 5, say, '''12th element''' where there is no value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s see what will happen.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo run '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''cargo run'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''index out of bounds, the length is 5 but the index is 11.'''&lt;br /&gt;
|| We see an error- '''index out of bounds, the length is 5 but the index is 11.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, '''arrays''' in '''Rust''' are different as compared to other '''programming languages'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That’s because they have a fixed length.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
* '''Supported Data Types '''&lt;br /&gt;
* '''Scalar Data Types '''&lt;br /&gt;
* '''Compound Data Types''' and &lt;br /&gt;
* Its '''types '''in '''Rust'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment,&lt;br /&gt;
&lt;br /&gt;
* Go to the project folder '''rust-assignment'''&lt;br /&gt;
* In the '''main.rs''' file&lt;br /&gt;
** '''Initialize''' a '''variable '''named '''m '''and assign an '''array '''to it&lt;br /&gt;
** The '''array '''should contain '''5 numbers '''as''' elements'''&lt;br /&gt;
** Print the '''elements '''of the '''array'''&lt;br /&gt;
* '''Compile '''and '''execute '''the project&lt;br /&gt;
* Observe the output in the '''Terminal'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education, Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| This is Jayesh signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Rust/C2/Variables-and-Mutability-in-Rust/English</id>
		<title>Rust/C2/Variables-and-Mutability-in-Rust/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Rust/C2/Variables-and-Mutability-in-Rust/English"/>
				<updated>2021-02-01T16:53:26Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Variables and Mutability&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: Praveen S&lt;br /&gt;
&lt;br /&gt;
Keywords: Rust, cargo, package manager, variables, mut&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Welcome to the spoken tutorial on “'''Variables and Mutability in RUST'''”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn:&lt;br /&gt;
&lt;br /&gt;
* How to create '''variables'''.&lt;br /&gt;
* About '''mutability''' and &lt;br /&gt;
* How to '''mutate variables''' in '''Rust'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Rust''' version 1.47.0&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''editor''' of your choice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide : Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
&lt;br /&gt;
* You should be familiar with '''compiling''' and '''running Rust''' files'''.'''&lt;br /&gt;
* If not, please go through the prerequisite '''Rust''' tutorials on this website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The file used in this tutorial is available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the file.&lt;br /&gt;
* Make a copy and then use it for practising.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Mutability&lt;br /&gt;
|| &lt;br /&gt;
* In '''Rust, variables''' are '''immutable''' by default. &lt;br /&gt;
* That means, once the '''variable''' is '''declared''' we cannot change its value. &lt;br /&gt;
* This is one of many advantages in '''Rust '''&lt;br /&gt;
* That encourages us to write our code in a way that,&lt;br /&gt;
* It takes advantage of the safety and concurrency that '''Rust''' offers.&lt;br /&gt;
&lt;br /&gt;
To understand this let us create a '''project''' and see how this works.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Press '''Ctrl+Alt+T '''keys&lt;br /&gt;
|| Open the '''terminal''' by pressing '''Ctrl,Alt''' and '''T''' keys simultaneously on the keyboard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ensure that you have '''root permissions''' to '''run''' the '''commands'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Here onwards, please remember to press the '''Enter''' key after typing each '''command'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd Desktop/MyRustProject&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Using '''cd''' command go to the '''Rust''' practice folder which we created earlier.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;cargo new variables_mutability [Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Let us create a new '''project''' named '''new variables_mutability.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type the '''command''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Open Visual Studio Code editor.&lt;br /&gt;
|| You may use any '''editor''' of your choice.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will use '''Visual Studio Code editor '''for this demonstration'''.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Welcome Page -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open Folder -&amp;gt;&lt;br /&gt;
&lt;br /&gt;
variables_mutability&lt;br /&gt;
|| Open the created '''project''' by clicking on the '''Open folder''' link in the '''Welcome page.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Browse and locate the  “'''variables_mutability'''” folder.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK '''button at the top right corner.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click on '''variables_mutability'''&lt;br /&gt;
|| Under '''EXPLORER''' section, expand the '''project  “variables_mutability'''” by clicking on it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Expand '''src '''and click on '''main.rs'''&lt;br /&gt;
|| Then expand the '''src''' and open the '''main.rs''' file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
fn main(){&lt;br /&gt;
&lt;br /&gt;
let a = 1;&lt;br /&gt;
&lt;br /&gt;
print!(“The value of a is {}”,a);&lt;br /&gt;
&lt;br /&gt;
a=2;&lt;br /&gt;
&lt;br /&gt;
print!(“The value of a is {}”,a);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''editor''', replace the '''code''' as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Highlight: '''let '''&lt;br /&gt;
|| '''let keyword''' is used to '''declare variables''' in '''Rust.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''let a = 1;'''&lt;br /&gt;
|| Here we have '''initialized''' the '''variable a '''and assigned the value '''1''' to it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''println!(&amp;quot;The value of a is {}&amp;quot;,a);'''&lt;br /&gt;
|| Using the '''println macro''' we are printing the value.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print!(&amp;quot;The value of a is '''{}'''&amp;quot;,a);&lt;br /&gt;
|| Here the '''{} open and close brace'''is a '''format specifier.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print!(&amp;quot;The value of a is {}&amp;quot;,'''a''');&lt;br /&gt;
|| In the '''print method''', the '''variable a''' is after comma.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is the value for the respective '''format specifier'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''a = 2;'''&lt;br /&gt;
|| Here, we are trying to reassign the '''variable''' to 2.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''print!(&amp;quot;The value of a is {}&amp;quot;,a);'''&lt;br /&gt;
|| After reassigning we are printing the '''variable’s''' value to see what does the value contain.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cd '''variables_mutability'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Go to the '''project''' folder '''variables_mutability '''using the '''cd command.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cargo build '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| To '''compile '''the '''Cargo project''', type '''cargo build'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''cannot assign twice to immutable variable ‘a’'''&lt;br /&gt;
|| Here, we can see an error - '''cannot assign twice to immutable variable ‘a’.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Recall in the beginning of the tutorial I had mentioned that''' variables''' are '''immutable''' by default.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to Editor&lt;br /&gt;
|| So switch back to the '''editor.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let''' mut '''a = 1;&lt;br /&gt;
|| Now, type '''m u t '''in between '''let''' and '''a'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
let''' mut '''a = 1;&lt;br /&gt;
|| Here we are telling the '''compiler''' that the '''initialized variable''' is '''mutable'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Ctrl + S&lt;br /&gt;
|| Save the file.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;cargo run [Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''cargo run'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The value of a is 1The value of a is 2&lt;br /&gt;
|| We can see the output. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Both the '''initialized''' and the modified values are printed successfully.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
cargo run &lt;br /&gt;
|| After switching back, I directly did a '''cargo run''' without '''compiling''' the '''project''' again.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Did you notice that?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When we do a''' cargo run''' the '''package manager''' will '''build''' again and '''run''' the '''project'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So going forward, we can directly use '''cargo run''' to '''build '''and '''run '''the '''project''' in one go.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide''': '''Summary''' '''&lt;br /&gt;
|| In this tutorial, we have learnt:&lt;br /&gt;
&lt;br /&gt;
* How to create '''variables'''&lt;br /&gt;
* About '''mutability''' and&lt;br /&gt;
* How to '''mutate variables'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment,&lt;br /&gt;
&lt;br /&gt;
* Go to the '''project''' folder '''rust-assignment'''&lt;br /&gt;
* In the '''main.rs''' file&lt;br /&gt;
** Create a '''variable '''named '''s''' and make it '''mutable'''.&lt;br /&gt;
** Assign '''13''' as a value to '''s''' &lt;br /&gt;
** Print the value of '''s'''&lt;br /&gt;
** Reassign the value of '''s''' as '''19'''&lt;br /&gt;
** Print the value of '''s'''&lt;br /&gt;
* '''Compile '''and '''execute '''the '''project'''.&lt;br /&gt;
* Observe the output in the '''Terminal'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Forum questions&lt;br /&gt;
|| Pls post your timed queries in this forum&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education, Government of India&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| This is Jayesh signing off. Thank you for joining&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Rust/C2/Installation-of-Rust-on-Linux/English</id>
		<title>Rust/C2/Installation-of-Rust-on-Linux/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Rust/C2/Installation-of-Rust-on-Linux/English"/>
				<updated>2021-02-01T16:34:32Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Title of the script: Installation of Rust on Linux OS&lt;br /&gt;
&lt;br /&gt;
Author: Jayesh Katta Ramalingaiah&lt;br /&gt;
&lt;br /&gt;
Domain Reviewer: &lt;br /&gt;
&lt;br /&gt;
Novice Reviewer: Praveen S&lt;br /&gt;
&lt;br /&gt;
Keywords: Rust, version, rustc, cargo, rustup&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border = “1”&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Visual Cue'''&amp;lt;/center&amp;gt;&lt;br /&gt;
|| &amp;lt;center&amp;gt;'''Narration'''&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Welcome to the spoken tutorial on '''Installation of Rust on Linux OS'''.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: &lt;br /&gt;
&lt;br /&gt;
Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn:&lt;br /&gt;
* How to install '''Rust'''. &lt;br /&gt;
* Create and execute a '''Rust''' file&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: System Specifications&lt;br /&gt;
|| This tutorial is recorded using:&lt;br /&gt;
* '''Ubuntu Linux''' OS version 18.04&lt;br /&gt;
* '''Rust''' version 1.47.0&lt;br /&gt;
* '''Visual Studio Code''' version 1.45.0 ('''code editor''')&lt;br /&gt;
&lt;br /&gt;
However you may use any other editor of your choice.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
&lt;br /&gt;
* You need an '''internet connection''' to install the necessary '''packages''' and&lt;br /&gt;
* You should be familiar with basic '''Linux commands.'''&lt;br /&gt;
* If not, please go through the prerequisite '''Linux''' tutorials on this website.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Code files&lt;br /&gt;
|| &lt;br /&gt;
* The files used in this tutorial are available in the''' Code files''' link on this tutorial page.&lt;br /&gt;
* Pls download and extract the files.&lt;br /&gt;
* Make a copy and then use them for practising.&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Let us begin with the installation of '''Rust'''.&lt;br /&gt;
|-&lt;br /&gt;
|| Show '''commands.txt''' in text editor &lt;br /&gt;
|| I have opened the '''Commands.txt '''file in a '''text editor '''on my machine.&lt;br /&gt;
&lt;br /&gt;
And I will use the same file to copy-paste the '''commands''' during the demonstration.&lt;br /&gt;
&lt;br /&gt;
Shortcut to paste '''commands''' on the '''terminal''' is '''Shift, Ctrl '''and '''V '''keys'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Let us begin.&lt;br /&gt;
|-&lt;br /&gt;
|| Press '''Ctrl+Alt+T '''keys&lt;br /&gt;
|| Open the '''terminal''' by pressing '''Ctrl,Alt''' and '''T''' keys simultaneously on the keyboard.&lt;br /&gt;
&lt;br /&gt;
Ensure that you have '''root permissions''' to '''run''' the '''commands'''.&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Here onwards, please remember to press the '''Enter''' key after typing each '''command'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Type: &lt;br /&gt;
&lt;br /&gt;
sudo apt-get install curl -y &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| We will be installing '''Rust''' with the help of the '''curl command line tool.'''&lt;br /&gt;
&lt;br /&gt;
So, we have to first '''install curl''' if we haven’t done so earlier.&lt;br /&gt;
&lt;br /&gt;
To do so type the '''command''' as shown on the '''terminal'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Enter admin password&lt;br /&gt;
|| If '''prompted''', enter the '''admin password''' to proceed further.&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| We have successfully '''installed curl'''.&lt;br /&gt;
&lt;br /&gt;
Next let us download and '''install Rust''' using '''Curl'''.&lt;br /&gt;
&lt;br /&gt;
To do so type the '''command''' as shown on the '''terminal'''.&lt;br /&gt;
|-&lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| The download may take some time depending upon your '''internet speed.'''&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight one by one:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Proceed with installation (default)&lt;br /&gt;
&lt;br /&gt;
Customize installation&lt;br /&gt;
&lt;br /&gt;
Cancel installation&lt;br /&gt;
|| Once the '''package''' is downloaded, we will be '''prompted''' to choose one of the following options:&lt;br /&gt;
&lt;br /&gt;
'''Proceed with installation (default)'''&lt;br /&gt;
&lt;br /&gt;
'''Customize installation'''&lt;br /&gt;
&lt;br /&gt;
'''Cancel installation'''&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&amp;lt;nowiki&amp;gt;1 [Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| To proceed with default '''installation''', type '''1''' and press '''Enter'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Rust is installed now. Great!&lt;br /&gt;
|| We have successfully installed '''Rust'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''sudo reboot '''&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Once the installation is done, we need to restart our computer.&lt;br /&gt;
&lt;br /&gt;
To do so, type '''sudo reboot''' in the '''terminal'''.&lt;br /&gt;
&lt;br /&gt;
This will restart your computer.&lt;br /&gt;
|-&lt;br /&gt;
|| Press '''Ctrl+Alt+T '''keys&lt;br /&gt;
|| Once you have restarted the computer, open the '''terminal''' again.&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;rustc --version [Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now let us cross verify the '''Rust installation'''.&lt;br /&gt;
&lt;br /&gt;
Type the '''command''' as shown in the '''terminal'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
rustc 1.47.0&lt;br /&gt;
|| This '''command''' shows the version of '''Rust''' installed in your computer.&lt;br /&gt;
&lt;br /&gt;
The '''version''' number may be different in your case.&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;rustup [Enter] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Now type '''rustup''' on the '''terminal.'''&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration &lt;br /&gt;
|| This shows us a list of '''commands''' to '''run'''.&lt;br /&gt;
&lt;br /&gt;
'''rustup''' is responsible for the complete '''Rust installation''' using the '''curl command.'''&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Rust Update&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;rustup update [Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| If you wish to update your '''Rust''' version, then execute this '''command''' on the '''terminal'''.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: rustup toolchain list&lt;br /&gt;
|| '''rustup toolchain command''' lists the various '''toolchains''' of '''Rust''' installed in your machine.&lt;br /&gt;
&lt;br /&gt;
For now, I have only one stable version installed. &lt;br /&gt;
&lt;br /&gt;
If you have any other versions, then that version would be displayed.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: cargo&lt;br /&gt;
|| '''cargo''' is a '''package manager''' to maintain a '''Rust project''' with '''dependencies'''. &lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;cargo [Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| You can check whether '''cargo''' is '''installed''' or not using the '''cargo command''' in the '''terminal.'''&lt;br /&gt;
&lt;br /&gt;
This shows a list of '''commands''' which can be executed using '''cargo'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cargo &amp;lt;nowiki&amp;gt;--version [Enter] &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| This '''command''' shows the '''version''' of the '''cargo package manager installed''' in your machine.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Common Errors After Installation&lt;br /&gt;
|| Common Errors After '''Installation'''&lt;br /&gt;
* '''System restart''' is required after '''installing rust'''.&lt;br /&gt;
* If not, we could land with these errors&lt;br /&gt;
** '''Rustup'''&lt;br /&gt;
** '''Rustc'''&lt;br /&gt;
** '''Cargo - command not found'''&lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| Next let us learn how to create and '''execute''' a '''Rust''' file.&lt;br /&gt;
|-&lt;br /&gt;
|| Open Visual Studio Code editor.&lt;br /&gt;
|| You may use any '''editor''' of your choice.&lt;br /&gt;
&lt;br /&gt;
I will use '''Visual Studio Code editor '''for this demonstration'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fn main() {&lt;br /&gt;
&lt;br /&gt;
println!(&amp;quot;Hello World&amp;quot;); &lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
|| In the '''code editor''', type the code as shown.&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Highlight: &lt;br /&gt;
&lt;br /&gt;
'''fn main(){'''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| This is our '''main function.''' &lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Highlight: '''fn '''&lt;br /&gt;
|| The '''keyword fn''' is used as a '''syntax''' to create a '''function''' in '''Rust'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Highlight: '''main()'''&lt;br /&gt;
|| '''main''' indicated the name of the '''function'''. &lt;br /&gt;
&lt;br /&gt;
The '''Rust execution''' starts from the '''main function.'''&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] &amp;lt;/nowiki&amp;gt;Highlight: &lt;br /&gt;
&lt;br /&gt;
'''{ '''&lt;br /&gt;
&lt;br /&gt;
'''}'''&lt;br /&gt;
|| The code written in between the '''open''' and '''closed curly braces''' would be the '''function body.'''&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight &amp;lt;/nowiki&amp;gt;'''print!'''&lt;br /&gt;
|| '''Print!()''' is the '''print function''' in '''Rust'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Hello World'''&lt;br /&gt;
|| Here we have '''Hello World''' in double quotes as a '''parameter''' in the '''function call'''.&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Editor] Highlight &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''print!(“Hello World”)'''&lt;br /&gt;
|| So, when we '''run''' the '''program''', '''Hello World''' gets printed.&lt;br /&gt;
|-&lt;br /&gt;
|| Press Ctrl + S&lt;br /&gt;
|| Let us save the file by pressing '''Ctrl''' + '''S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|| Point to Save As dialog box&lt;br /&gt;
|| '''Save''' dialog box opens.&lt;br /&gt;
|-&lt;br /&gt;
|| Select '''Desktop''' on the left side&lt;br /&gt;
|| Select '''Desktop''' location.&lt;br /&gt;
|-&lt;br /&gt;
|| Point to Name &amp;gt;&amp;gt; type &amp;quot;hello-world.rs&amp;quot;&lt;br /&gt;
|| In the '''Name''' field, type the name of the file as '''hello-world.rs'''&lt;br /&gt;
|-&lt;br /&gt;
|| Highlight .rs&lt;br /&gt;
|| The extension '''.rs''' states that this is a '''Rust code file'''.&lt;br /&gt;
|-&lt;br /&gt;
|| Under '''Desktop''' &amp;gt;&amp;gt; Create '''MyRustProject '''folder&lt;br /&gt;
|| And then create a folder named '''MyRustProject.'''&lt;br /&gt;
|-&lt;br /&gt;
|| Point to '''MyRustProject'''&lt;br /&gt;
|| From now on, I will be saving my '''Rust files''' in this folder.&lt;br /&gt;
|-&lt;br /&gt;
|| Click on '''Save''' button.&lt;br /&gt;
|| Then click on the '''Save''' button on the top right corner of the dialog box.&lt;br /&gt;
|-&lt;br /&gt;
|| &lt;br /&gt;
|| We have created a '''Rust file''' and have written the '''Hello World program'''. &lt;br /&gt;
&lt;br /&gt;
Now, it’s time to '''compile''' and '''run''' the '''file'''.&lt;br /&gt;
|-&lt;br /&gt;
|| Switch to terminal&lt;br /&gt;
|| Switch back to the '''terminal.'''&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
cd Desktop/MyRustProject &lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;[Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| Using''' cd command''' go to the location where the '''Rust file '''is saved.&lt;br /&gt;
&lt;br /&gt;
In my case, it is '''MyRustProject''' on the '''Desktop.'''&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;rustc hello-world.rs [Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| To '''compile,''' type '''rustc space filename''' with extension '''.rs'''&lt;br /&gt;
&lt;br /&gt;
In my case it is '''hello-world.rs'''&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Type:&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;./hello-world [Enter]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|| The '''compilation''' is done without any error.&lt;br /&gt;
&lt;br /&gt;
Now, to '''run''' type the '''dot slash filename''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
In my case it is '''./hello-world'''&lt;br /&gt;
|-&lt;br /&gt;
|| &amp;lt;nowiki&amp;gt;[Terminal] Highlight: &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hello World&lt;br /&gt;
|| '''Hello world''' text gets printed.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Common Errors&lt;br /&gt;
&lt;br /&gt;
'''sudo apt install build-essential'''&lt;br /&gt;
|| &lt;br /&gt;
* You could land up with this error while '''compiling - linker ‘cc’ not found. '''&lt;br /&gt;
* It means you don’t have '''gcc''' in your machine.&lt;br /&gt;
* To resolve this, '''install''' the '''build essentials''' with this '''command'''. &lt;br /&gt;
|-&lt;br /&gt;
|| Only narration&lt;br /&gt;
|| We have successfully '''installed Rust''' and executed the '''Hello World program'''.&lt;br /&gt;
&lt;br /&gt;
With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
Let’s summarize.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Summary &lt;br /&gt;
|| In this tutorial, we have learnt&lt;br /&gt;
* How to install '''Rust'''&lt;br /&gt;
* Some basic '''Rust''' commands &lt;br /&gt;
* How to overcome common errors during '''installation'''&lt;br /&gt;
* Create and execute '''Rust file'''&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Assignment&lt;br /&gt;
|| As an assignment,&lt;br /&gt;
* Create a file '''assignment.rs'''&lt;br /&gt;
* Print - ‘'''Welcome to Spoken Tutorials!'''’&lt;br /&gt;
* '''Compile '''and '''execute '''the file.&lt;br /&gt;
* Observe the output in the '''Terminal'''&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''About Spoken Tutorial Project&lt;br /&gt;
|| &lt;br /&gt;
* The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
* Please download and watch it&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:''' Spoken tutorial workshops&lt;br /&gt;
|| &lt;br /&gt;
* We conduct workshops using spoken tutorials and give certificates.&lt;br /&gt;
* For more details, please write to us.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide:'''Answers for THIS Spoken Tutorial&lt;br /&gt;
|| &lt;br /&gt;
* Do you have questions in THIS Spoken Tutorial? &lt;br /&gt;
* Please visit this site &lt;br /&gt;
* Choose the minute and second where you have the question &lt;br /&gt;
* Explain your question briefly &lt;br /&gt;
* The Spoken Tutorial project team will ensure an answer&lt;br /&gt;
* You will have to register on this website to ask questions.&lt;br /&gt;
|-&lt;br /&gt;
|| '''Slide: '''Forum for specific Questions&lt;br /&gt;
|| &lt;br /&gt;
* The Spoken Tutorial forum is for specific questions on this tutorial.&lt;br /&gt;
* Please do not post unrelated and general questions on them.&lt;br /&gt;
* This will help reduce the clutter.&lt;br /&gt;
* With less clutter, we can use these discussions as instructional material.&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Acknowledgement&lt;br /&gt;
|| Spoken Tutorial Project is funded by Ministry of Education, Government of India&lt;br /&gt;
|-&lt;br /&gt;
|| Slide: Thanks&lt;br /&gt;
|| This is Jayesh signing off. Thank you for joining&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/DSpace/C2/Customization-of--DSpace-Home-page-on-Windows-OS/English</id>
		<title>DSpace/C2/Customization-of--DSpace-Home-page-on-Windows-OS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/DSpace/C2/Customization-of--DSpace-Home-page-on-Windows-OS/English"/>
				<updated>2021-01-13T18:11:40Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''SayScript: Customization of DSpace Home Page (on Windows 10)'''&lt;br /&gt;
&lt;br /&gt;
'''Author : Pankaj Patil'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: DSpace Customization, Home page customization, Dspace Logo, DSpace Banner, DSpace news, DSpace customization on Windows 10'''&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|- &lt;br /&gt;
| align=center| '''Visual Cue'''&lt;br /&gt;
| align=center| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Welcome to this spoken tutorial on '''Customization of''' '''DSpace home page (on Windows 10)'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn to &lt;br /&gt;
* Change '''DSpace''' '''logos'''&lt;br /&gt;
* Modify the '''DSpace''' '''banner''' and&lt;br /&gt;
* Update the '''News''' sections&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: System requirements&lt;br /&gt;
|| This tutorial is recorded using&lt;br /&gt;
* '''Windows 10 64 bit OS'''&lt;br /&gt;
* '''DSpace version 6.3'''&lt;br /&gt;
* '''WordPad '''and&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
However you may use any other '''text editor''' or '''browser''' of your choice.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Pre-requisites &lt;br /&gt;
|| To practice this tutorial, you should have&lt;br /&gt;
* Installed '''DSpace version 6.3''' on your system&lt;br /&gt;
* '''Tomcat''' service should be running&lt;br /&gt;
* Have '''Administrator''' authority in '''DSpace '''and&lt;br /&gt;
* And have a working '''internet''' connection&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Pre-requisites &lt;br /&gt;
|| &lt;br /&gt;
* You should also have familiarity with basic''' HTML''' tags&lt;br /&gt;
* If not then please go through the prerequisite tutorials on this website.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Code Files&lt;br /&gt;
|| &lt;br /&gt;
* The '''files''' and '''commands''' used in this tutorial are available in a file in the '''Code Files '''link on this tutorial page.&lt;br /&gt;
* Please download and extract the files before practicing.&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to '''WordPad''' and open the file&lt;br /&gt;
|| I have opened the '''commands file''' in the '''WordPad editor '''on my machine.&lt;br /&gt;
&lt;br /&gt;
And I will use the same file to copy-paste the '''commands''' during the demonstration.&lt;br /&gt;
&lt;br /&gt;
The shortcut to paste on the '''Command Prompt '''is''' Ctrl '''and '''V '''keys'''.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : '''DSpace''' Customization&lt;br /&gt;
|| &lt;br /&gt;
* '''DSpace''' is a highly customizable '''software application'''.&lt;br /&gt;
* We can customize the '''DSpace user''' interface and its behaviour as per our preference.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : '''DSpace''' UI Customization&lt;br /&gt;
|| The '''user''' interface of '''DSpace''' can be modified for&lt;br /&gt;
* Branding of a '''repository''' &lt;br /&gt;
* Communicate vision, mission of the organization&lt;br /&gt;
* Enhance aesthetics and usability and&lt;br /&gt;
* Present tool tip or help to use&lt;br /&gt;
&lt;br /&gt;
Now, let us understand the different sections of the '''DSpace''' '''home page.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Open Web Browser &lt;br /&gt;
Address Bar &amp;gt;&amp;gt; '''localhost:8080'''&lt;br /&gt;
|| Open a '''web browser'''.&lt;br /&gt;
&lt;br /&gt;
In the '''address bar''', type '''localhost:8080''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
The '''DSpace''' interface opens.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to different portions in''' DSpace home page'''&lt;br /&gt;
|| We have a '''Navigation bar logo''' located at the top-left corner.&lt;br /&gt;
&lt;br /&gt;
Below that we have a '''Banner''' section.&lt;br /&gt;
&lt;br /&gt;
The''' DSpace logo''' is located next to the '''banner'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to different portions in''' DSpace home page'''&lt;br /&gt;
|| Below the '''banner''' section, we have a green color bar called '''breadcrumb bar'''.&lt;br /&gt;
&lt;br /&gt;
Below the '''breadcrumb bar, '''we have''' Top News '''and''' Side news '''sections.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: '''DSpace Navbar logo''' &lt;br /&gt;
Name: '''dspace-logo-only.png'''&lt;br /&gt;
Location: '''C:\dspace-6.3-src-release\dspace-jspui\src\main\webapp\image'''&lt;br /&gt;
Dimensions: '''25 x 25 pixels'''.&lt;br /&gt;
|| Let us begin with the customization of the '''DSpace Navigation bar logo'''.&lt;br /&gt;
&lt;br /&gt;
These are the properties for the '''logo'''.&lt;br /&gt;
&lt;br /&gt;
We will replace this default '''logo''' with a new one.&lt;br /&gt;
&lt;br /&gt;
Make sure that the new '''logo''' has the same properties, if you are using your own '''logo'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : '''DSpace''' source code&lt;br /&gt;
|| The '''source code''' for '''DSpace''' is located in the '''dspace-6.3-src-release '''directory.&lt;br /&gt;
&lt;br /&gt;
If we wish to customize '''DSpace''', then we have to make changes in this directory.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Let us rename the default '''DSpace navigation bar logo '''for''' '''backup purposes.&lt;br /&gt;
|- &lt;br /&gt;
|| Browse to '''image '''folder of dspace&lt;br /&gt;
'''C drive &amp;gt;&amp;gt; dspace-6.3-src-release &amp;gt;&amp;gt; dspace-jspui &amp;gt;&amp;gt; src &amp;gt;&amp;gt; main &amp;gt;&amp;gt; webapp &amp;gt;&amp;gt; image'''&lt;br /&gt;
|| To do so, browse to the '''image''' folder of '''dspace''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Rename''' dspace-logo-only.png '''as''' dspace-logo-only-old.png'''&lt;br /&gt;
|| Rename''' dspace-logo-only.png '''as''' dspace-logo-only-old.png '''as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration Only&lt;br /&gt;
|| Now, let us proceed to copy a new '''logo''' into the '''image''' directory.&lt;br /&gt;
|- &lt;br /&gt;
|| Open '''File Explorer '''&lt;br /&gt;
|| For that, open the '''File Explorer''' application.&lt;br /&gt;
|- &lt;br /&gt;
|| Browse to '''Downloads''' folder&lt;br /&gt;
|| Go to the folder where you downloaded the images from the '''Code files''' link.&lt;br /&gt;
&lt;br /&gt;
I have downloaded it in the '''Downloads''' folder.&lt;br /&gt;
|- &lt;br /&gt;
|| Browse to '''dimages '''folder&lt;br /&gt;
|| I will now browse to the '''dimages''' folder.&lt;br /&gt;
|- &lt;br /&gt;
|| Copy '''dspace-logo-only.png '''from '''dimages '''to '''image '''folder of '''DSpace'''&lt;br /&gt;
|| Copy '''dspace-logo-only.png '''from '''dimages '''to the '''image '''folder of '''DSpace''' as shown. &lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Next we have to '''rebuild DSpace''' to update these changes.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to the '''Desktop'''&lt;br /&gt;
Right click on '''Rebuild-DSpace '''&amp;gt;&amp;gt; '''Run as Administrator'''&lt;br /&gt;
|| Go to the '''Desktop '''and locate the file '''Rebuild-DSpace'''&lt;br /&gt;
&lt;br /&gt;
Then right-click on it and select''' Run as Administrator.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click''' '''on '''yes'''&lt;br /&gt;
|| If '''prompted, '''click''' '''on the''' Yes '''button in the '''User Account Control''' dialog box&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''BUILD SUCCESSFUL '''message&lt;br /&gt;
|| On successful completion,''' BUILD SUCCESSFUL '''message will appear on the '''Command Prompt.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Show closing of '''Command Prompt'''&lt;br /&gt;
|| After the '''rebuild''' process, the '''Command Prompt '''closes automatically.&lt;br /&gt;
|- &lt;br /&gt;
|| Refresh''' DSpace Home page'''&lt;br /&gt;
|| Now, switch to the '''browser''' and refresh the page.&lt;br /&gt;
&lt;br /&gt;
Observe the change. &lt;br /&gt;
&lt;br /&gt;
The old '''Navigation bar''' '''logo''' is replaced with the new one.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| In case, if you can’t see the updated '''logo''', kindly clear the '''cache''' and refresh the page.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Slide''' : DSpace logo&lt;br /&gt;
Name: '''logo.gif'''&lt;br /&gt;
Location: '''C:\dspace-6.3-src-release\dspace-jspui\src\main\webapp\image'''&lt;br /&gt;
Dimensions: '''165 x 132 pixels'''.&lt;br /&gt;
|| Now, next let us try to add our '''logo''' instead of the '''DSpace logo''' next to the '''banner''' section.&lt;br /&gt;
&lt;br /&gt;
These are the properties of the '''logo'''.&lt;br /&gt;
&lt;br /&gt;
We will replace this default '''logo''' with our own '''logo'''.&lt;br /&gt;
&lt;br /&gt;
Make sure that the new '''logo''' has the same properties, if you are using your own '''logo'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration Only&lt;br /&gt;
|| Let us rename the existing '''logo''' for backup purposes.&lt;br /&gt;
|- &lt;br /&gt;
|| Switch back to '''images '''folder of '''DSpace'''&lt;br /&gt;
|| Switch to the '''images '''folder of '''DSpace.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Rename '''logo.gif '''as''' logo-old.gif'''&lt;br /&gt;
|| Rename '''logo.gif '''as''' logo-old.gif '''as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| copy '''logo.gif''' image from '''dimages '''to '''image '''folder of '''DSpace'''&lt;br /&gt;
|| Next, copy the new '''logo.gif''' image from '''dimages '''to the '''image '''folder of '''DSpace''' as shown. &lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Now, '''rebuild DSpace''' to update the changes.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to the '''Desktop'''&lt;br /&gt;
|| Go to the '''Desktop'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Right click on '''Rebuild-DSpace '''&amp;gt;&amp;gt; Select '''Run as Administrator'''&lt;br /&gt;
|| '''Rebuild DSpace '''as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''BUILD SUCCESSFUL '''message&lt;br /&gt;
|| The '''build''' is successful.&lt;br /&gt;
|- &lt;br /&gt;
|| Refresh''' DSpace Home page'''&lt;br /&gt;
|| Now, switch to the '''browser''' and refresh the page. &lt;br /&gt;
&lt;br /&gt;
Observe the change.&lt;br /&gt;
&lt;br /&gt;
The '''DSpace logo''' next to the '''banner''' section is replaced with our own '''logo'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to''' DSpace banner '''&lt;br /&gt;
|| The''' DSpace banner''' is used for branding of '''repositories'''.&lt;br /&gt;
 &lt;br /&gt;
Let us proceed to modify the '''banner''' content now.&lt;br /&gt;
|- &lt;br /&gt;
|| Browse to '''resources '''folder&lt;br /&gt;
'''C Drive &amp;gt;&amp;gt; dspace-6.3-src-release &amp;gt;&amp;gt; dspace-api &amp;gt;&amp;gt; src &amp;gt;&amp;gt; main &amp;gt;&amp;gt; resources'''&lt;br /&gt;
|| So, in the '''file explorer''', browse to the '''resources''' folder of '''dspace''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Messages.properties'''&lt;br /&gt;
|| '''Messages.properties '''is a file, which contains '''user interface''' text of '''DSpace'''&lt;br /&gt;
|- &lt;br /&gt;
|| Open '''Messages.properties '''with '''WordPad'''&lt;br /&gt;
|| Let us open this file using the '''WordPad editor.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Show '''Messages.properties '''file&lt;br /&gt;
|| '''Messages.properties '''file contains '''Key Value''' pairs.&lt;br /&gt;
&lt;br /&gt;
'''Keys''' are referenced from '''jsp''' files and the corresponding '''value''' is rendered in '''UI'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Banner Heading Text&lt;br /&gt;
'''jsp.layout.header-default.brand.heading = IITB Repository'''&lt;br /&gt;
|| Scroll down and locate the '''key jsp.layout.header-default.brand.heading '''&lt;br /&gt;
&lt;br /&gt;
Change its default '''value''' to '''IITB Repository'''.&lt;br /&gt;
&lt;br /&gt;
Basic '''HTML tags''' such as '''heading''' can be used to write the '''value'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''jsp.layout.header-default.brand.heading = &amp;lt;b&amp;gt; IITB Repository &amp;lt;/b&amp;gt;'''&lt;br /&gt;
|| If you wish to display the text in a stylish way, we can use those '''html tags''' also.&lt;br /&gt;
&lt;br /&gt;
For example, I can type the '''value''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| '''&amp;lt;h3&amp;gt; IITB Digital Repository is the collection of digital assets &amp;lt;/h3&amp;gt;'''&lt;br /&gt;
|| Now locate the '''key''' '''jsp.layout.header-default.brand.description '''&lt;br /&gt;
&lt;br /&gt;
Change its default value as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Save and close&lt;br /&gt;
|| Save and close the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Right click on '''Rebuild-DSpace '''&amp;gt;&amp;gt; Run as Administrator&lt;br /&gt;
|| Once again, '''rebuild DSpace '''as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration Only&lt;br /&gt;
|| The '''build '''is successful as indicated by the on-screen message.&lt;br /&gt;
|- &lt;br /&gt;
|| Refresh''' DSpace Home page'''&lt;br /&gt;
|| Now, switch to the '''browser''' and refresh the page. &lt;br /&gt;
&lt;br /&gt;
Observe the change.&lt;br /&gt;
&lt;br /&gt;
The '''banner section''' content is updated now.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Top and Sidebar news on Home Page'''&lt;br /&gt;
|| '''Top news''' and '''Side news''' are used to display updates and news about the '''Repository'''.&lt;br /&gt;
&lt;br /&gt;
We will edit these in the front end itself with the help of the '''administrator'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Log in to '''DSpace'''&lt;br /&gt;
'''Mail address: dspace.u1@gmail.com'''&lt;br /&gt;
'''Password: u1pass'''&lt;br /&gt;
|| Click on the '''Sign on to '''button at the top right corner.&lt;br /&gt;
&lt;br /&gt;
From the drop-down, select '''My DSpace.'''&lt;br /&gt;
&lt;br /&gt;
'''Log''' into '''DSpace''' with your '''administrator’s email address '''and''' password'''.&lt;br /&gt;
&lt;br /&gt;
For this demonstration, I will log in with the '''administrator’s email id dspace.u1@gmail.com'''&lt;br /&gt;
&lt;br /&gt;
'''My DSpace''' page appears on the screen.&lt;br /&gt;
|- &lt;br /&gt;
|| Select''' Administer'''&lt;br /&gt;
|| Click on the down arrow at the top right corner next to the '''admin’s mail id.'''&lt;br /&gt;
&lt;br /&gt;
Then select '''Administer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''General Settings &amp;gt; Edit News'''&lt;br /&gt;
|| We will be redirected to the '''admin''' interface.&lt;br /&gt;
&lt;br /&gt;
On the top '''navigation bar''', click on the '''General Settings''' menu.&lt;br /&gt;
&lt;br /&gt;
Then select '''Edit News '''from the drop-down.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''Top News'''&lt;br /&gt;
|| Select '''Top News''' in the '''News Editor''' section to edit '''Top News.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Edit '''button&lt;br /&gt;
|| Click on the '''Edit '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to''' News Editor'''&lt;br /&gt;
|| '''News Editor''' page opens for the '''Top News''' with default '''DSpace Top News.'''&lt;br /&gt;
&lt;br /&gt;
You can use '''HTML''' '''tags''' in the '''News Editor.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''&amp;lt;p&amp;gt;Welcome to IITB digital repository!&amp;lt;/p&amp;gt;'''&lt;br /&gt;
|| I am updating the '''Top News''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Save '''button&lt;br /&gt;
|| Click on the '''Save''' button now.&lt;br /&gt;
|- &lt;br /&gt;
|| Select''' Sidebar News '''and click on''' Edit '''button&lt;br /&gt;
&lt;br /&gt;
Update the '''Sidebar News'''&lt;br /&gt;
&lt;br /&gt;
'''&amp;lt;p&amp;gt;Explore IITB digital repository and Enhance learning.&amp;lt;/p&amp;gt;'''&lt;br /&gt;
|| Likewise, I will edit the '''sidebar news '''as shown here.&lt;br /&gt;
|- &lt;br /&gt;
|| Save '''Sidebar News'''&lt;br /&gt;
|| Click on the '''Save''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on''' Home Tab'''&lt;br /&gt;
|| In the top '''navigation bar''', click on the '''Home '''menu'''.'''&lt;br /&gt;
&lt;br /&gt;
The''' Top News '''and''' Sidebar News '''section for the '''DSpace home page''' is now updated.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| LIkewise, we can customise our '''DSpace home page''' based on our requirements.&lt;br /&gt;
|- &lt;br /&gt;
|| Logout form '''DSpace'''&lt;br /&gt;
|| Let us now '''logout''' from the '''DSpace''' interface.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
|| With this we have come to the end of this tutorial.&lt;br /&gt;
Let us summarize.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Summary&lt;br /&gt;
&lt;br /&gt;
|  | In this tutorial, we learnt to :&lt;br /&gt;
* Change '''DSpace logos'''&lt;br /&gt;
* Modify '''DSpace banner''' and&lt;br /&gt;
* Update news sections.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Assignment&lt;br /&gt;
|  | As an assignment&lt;br /&gt;
* Change '''Navbar logo '''and '''DSpace logo '''with your own '''logos'''&lt;br /&gt;
* Modify the '''DSpace banner''' content as well&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide : About Spoken Tutorial project&lt;br /&gt;
|  | The video at the following link summarises the '''Spoken Tutorial project.'''&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide : Spoken Tutorial workshops&lt;br /&gt;
|  | The '''Spoken Tutorial Project''' team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Answers for THIS Spoken Tutorial&lt;br /&gt;
|| Please post your timed queries in this Forum.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Acknowledgement -I&lt;br /&gt;
|  | '''Spoken Tutorial project''' is funded by the Ministry of Education (MoE), Government of India.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Acknowledgement -II&lt;br /&gt;
|  | '''DSpace spoken tutorial''' series is funded by the National Virtual Library of India, Ministry of Culture, Government of India.&lt;br /&gt;
|-&lt;br /&gt;
|  | Narration only&lt;br /&gt;
|  | This script and video for this tutorial was contributed by '''Pankaj Patil''' from''' IIT Bombay.'''&lt;br /&gt;
And this is '''Nancy Varkey '''signing off. Thanks for joining.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/DSpace/C2/Email-Configuration-for-DSpace-on-Windows-OS/English</id>
		<title>DSpace/C2/Email-Configuration-for-DSpace-on-Windows-OS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/DSpace/C2/Email-Configuration-for-DSpace-on-Windows-OS/English"/>
				<updated>2021-01-13T17:49:38Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Script : Email Configuration for DSpace on Windows'''&lt;br /&gt;
&lt;br /&gt;
'''Author : Pankaj Patil'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: DSpace Rebuild, DSpace Email Configuration, dspace.cfg, Rebuild script, DSpace gmail configuration, '''&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|- &lt;br /&gt;
|| '''Visual Cue'''&lt;br /&gt;
|| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Title&lt;br /&gt;
|| Welcome to this '''Spoken Tutorial''' on '''Email Configuration for DSpace''' '''on Windows OS.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Learning Objectives&lt;br /&gt;
|| In this tutorial, we will learn to&lt;br /&gt;
* '''Configure''' an '''email '''for '''DSpace'''&lt;br /&gt;
* Prepare a '''Batch '''file''' '''to '''rebuild DSpace '''and&lt;br /&gt;
* Send a '''test mail''' from '''DSpace'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: System requirements&lt;br /&gt;
|| This tutorial is recorded using&lt;br /&gt;
* '''Windows 10 64 bit OS'''&lt;br /&gt;
* '''DSpace version 6.3'''&lt;br /&gt;
* '''WordPad '''and&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
However you may use any other '''text editor''' or''' browser''' of your choice.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| To practice this tutorial,&lt;br /&gt;
* You should have installed '''DSpace 6.3 '''and&lt;br /&gt;
* You should have a working internet connection.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| &lt;br /&gt;
* If not then go through the prerequisite '''installation''' tutorials on this website.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Code files&lt;br /&gt;
|| &lt;br /&gt;
* The '''commands''' used in this tutorial are in a file in the '''Code Files '''link on this tutorial page.&lt;br /&gt;
* Please download and extract the file before practicing.&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to '''WordPad''' and open the file&lt;br /&gt;
|| I have opened the '''commands file''' in '''WordPad '''on my machine.&lt;br /&gt;
And I will use the same file to copy-paste the '''commands''' during the demonstration.&lt;br /&gt;
&lt;br /&gt;
The shortcut to paste on the '''Command Prompt '''is''' Ctrl '''and '''V '''keys'''.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Necessity of Email Configuration&lt;br /&gt;
|| In '''DSpace''' we have to '''configure''' the '''email settings''' to send '''emails''' from '''DSpace'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Necessity of Email Configuration&lt;br /&gt;
|| '''DSpace''' sends '''emails''' to the '''users''' for various activities such as &lt;br /&gt;
* '''Email verification''' during '''registration'''&lt;br /&gt;
* Notification '''emails''' during '''Item submission '''and''' review'''&lt;br /&gt;
* Getting '''Dspace user’s feedback '''and&lt;br /&gt;
* Notifications to '''Community and Collection''' subscribers&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Let us begin.&lt;br /&gt;
|- &lt;br /&gt;
|| Browse '''C Drive &amp;gt;&amp;gt; dspace-6.3-src-release &amp;gt;&amp;gt; dspace &amp;gt;&amp;gt; config '''&lt;br /&gt;
|| In the '''file browser''', go to '''C Drive'''.&lt;br /&gt;
Browse and navigate to the '''config '''folder in '''dspace-6.3-src-release '''as shown.''' '''&lt;br /&gt;
|- &lt;br /&gt;
|| Open '''dspace.cfg '''with '''Wordpad '''&lt;br /&gt;
|| Open the '''configuration''' file '''dspace.cfg '''in '''WordPad editor'''.''' '''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''dspace.cfg '''in '''WordPad '''&lt;br /&gt;
|| '''dspace.cfg '''file is now open in '''WordPad'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Email settings'''&lt;br /&gt;
|| Scroll down and locate the '''Email settings''' section.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide:''' SMTP Services'''&lt;br /&gt;
|| '''DSpace '''requires '''SMTP service''' to send and receive '''emails.'''&lt;br /&gt;
'''SMTP services''' like '''Gmail, SendinBlue, SendGrid, Pepipost, Amazon SES '''or '''Mandrill''' can be used.&lt;br /&gt;
&lt;br /&gt;
Additionally, custom '''SMTP''' services can also be set up and used as well.&lt;br /&gt;
|- &lt;br /&gt;
|| '''mail.server = smtp.gmail.com'''&lt;br /&gt;
|| In this demonstration, I will configure a '''Gmail SMTP mail server.'''&lt;br /&gt;
So, first I’ll set the value for '''mail.server''' as '''smtp.gmail.com'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''mail.server.username =dspace.u1@gmail.com'''&lt;br /&gt;
'''mail.server.password =********'''&lt;br /&gt;
|| Next we have to give a valid '''gmail ID''' for '''mail.server.username.'''&lt;br /&gt;
I will use the '''admin’s mail id''', which is '''dspace.u1@gmail.com'''&lt;br /&gt;
&lt;br /&gt;
You can also use the same '''email id''' which you gave as your '''admin mail id'''.&lt;br /&gt;
&lt;br /&gt;
The value for '''mail.server.password '''has to be the '''password''' of dspace.u1@gmail.com.'''&lt;br /&gt;
&lt;br /&gt;
The typed '''password''' will be visible to everyone.&lt;br /&gt;
&lt;br /&gt;
So I have blurred it for this demonstration.&lt;br /&gt;
|-&lt;br /&gt;
|  | Type '''&amp;lt;nowiki&amp;gt;#&amp;lt;/nowiki&amp;gt;''' in front of the line&lt;br /&gt;
'''mail.server.port'''&lt;br /&gt;
|  | We will now use''' gmail’s SMTP port (SSL): 465''', to connect to the '''SMTP server'''.&lt;br /&gt;
So, let us disable the default '''SMTP port''' which is 25.&lt;br /&gt;
&lt;br /&gt;
To do so, type '''&amp;lt;nowiki&amp;gt;# &amp;lt;/nowiki&amp;gt;'''in front of the line '''mail.server.port'''. &lt;br /&gt;
|- &lt;br /&gt;
|| Set from Address of the email recipients&lt;br /&gt;
'''mail.from.address = dspace.u1@gmail.com '''&lt;br /&gt;
|| Now, give a valid '''email address''' for '''mail.from.address.'''&lt;br /&gt;
This '''email id''' will be considered as the '''from address''' for the recipients.&lt;br /&gt;
&lt;br /&gt;
Here I will type the value as '''dspace.u1@gmail.com'''&lt;br /&gt;
|- &lt;br /&gt;
|| Set Feedback recipient email address&lt;br /&gt;
'''feedback.recipient=dspace.u1@gmail.com'''&lt;br /&gt;
|| Please type a valid''' email address''' for '''feedback.recipient'''&lt;br /&gt;
&lt;br /&gt;
If a '''user''' submits any feedback in '''DSpace''', then their feedback will be sent to this '''email id'''.&lt;br /&gt;
&lt;br /&gt;
Here also I will type the value as '''dspace.u1@gmail.com'''&lt;br /&gt;
|- &lt;br /&gt;
|| Set email address for mail admin&lt;br /&gt;
'''mail.admin=dspace.u1@gmail.com'''&lt;br /&gt;
|| Next, we have to give a valid '''email address''' for '''mail.admin.'''&lt;br /&gt;
&lt;br /&gt;
'''System notifications '''and '''administration emails''' will be sent to '''mail.admin address'''.&lt;br /&gt;
&lt;br /&gt;
I will type the value as '''dspace.u1@gmail.com '''here.&lt;br /&gt;
|- &lt;br /&gt;
|| '''Mail.extraproperties &amp;gt;&amp;gt; '''remove # symbol&lt;br /&gt;
|| Next, we will '''configure''' the''' SMTP port''' '''(SSL): 465.'''&lt;br /&gt;
&lt;br /&gt;
Scroll down and locate the line '''&amp;lt;nowiki&amp;gt;#mail.extraproperties.&amp;lt;/nowiki&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
Remove '''&amp;lt;nowiki&amp;gt;# &amp;lt;/nowiki&amp;gt;'''symbol at the beginning of '''mail.extraproperties.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Remove # symbol&lt;br /&gt;
|| Also, remove''' # '''symbol at the beginning of the next two consecutive lines, as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Save and close file&lt;br /&gt;
|| Then, save and close the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Rebuild '''DSpace'''&lt;br /&gt;
|| Whenever we customize '''DSpace''', it is necessary to '''rebuild''' '''DSpace'''.&lt;br /&gt;
'''Rebuild''' process involves&lt;br /&gt;
* '''Compilation''' of''' source code'''&lt;br /&gt;
* '''Installation''' of '''Webapp '''and&lt;br /&gt;
* '''Deployment''' of '''DSpace''' on '''Tomcat server'''.&lt;br /&gt;
We will prepare a''' Batch '''file''' '''to '''rebuild''' '''DSpace''', and use it whenever required.&lt;br /&gt;
|- &lt;br /&gt;
|| Open '''Wordpad'''&lt;br /&gt;
|| So, open '''Wordpad.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [Wordpad] type: &lt;br /&gt;
'''call cd C:\Program Files\Apache Software Foundation\Tomcat 8.5\bin'''&lt;br /&gt;
&lt;br /&gt;
'''call Tomcat8.exe stop'''&lt;br /&gt;
&lt;br /&gt;
'''call cd C:\dspace-6.3-src-release'''&lt;br /&gt;
&lt;br /&gt;
'''call mvn -U clean package'''&lt;br /&gt;
&lt;br /&gt;
'''call cd C:\dspace-6.3-src-release\dspace\target\dspace-installer'''&lt;br /&gt;
&lt;br /&gt;
'''call ant fresh_install'''&lt;br /&gt;
&lt;br /&gt;
'''call cd C:\Program Files\Apache Software Foundation\Tomcat 8.5\bin'''&lt;br /&gt;
&lt;br /&gt;
'''call Tomcat8.exe start'''&lt;br /&gt;
&lt;br /&gt;
|| And type the '''commands''' as shown.&lt;br /&gt;
We have used these '''commands''' in the earlier tutorial to '''build dspace'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Press Ctrl+S keys&lt;br /&gt;
|| Save the file by pressing '''Ctrl + S''' keys together.&lt;br /&gt;
A dialog box to save the file appears.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''Desktop''' location to save file&lt;br /&gt;
|| On the left, select '''Desktop '''as a location to save the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on dropdown of '''Save as type -&amp;gt; Text Documents '''&lt;br /&gt;
|| Click on the '''Save as type '''dropdown  and select the '''type''' as '''Text Documents.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Enter File name &lt;br /&gt;
'''Rebuild-DSpace.bat'''&lt;br /&gt;
|| In the '''File name '''field, type the name as '''Rebuild-DSpace.bat'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| '''.bat '''extension indicates that it is a '''batch '''file. &lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Save''' button &lt;br /&gt;
|| Click on the '''Save''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to Dialog box&lt;br /&gt;
|| A dialog box opens to confirm this save.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Yes''' button&lt;br /&gt;
|| Click on the '''Yes''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| Close '''Rebuild-DSpace.bat '''file&lt;br /&gt;
|| Close '''Rebuild-DSpace.bat '''file.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Now let us '''rebuild DSpace''' using the '''Rebuild-DSpace.bat '''file.&lt;br /&gt;
|- &lt;br /&gt;
|| Go to the '''Desktop'''&lt;br /&gt;
Right click on '''Rebuild-DSpace '''&amp;gt;&amp;gt; '''Run as Administrator'''&lt;br /&gt;
|| Go to the '''Desktop '''and locate the file '''Rebuild-DSpace.'''&lt;br /&gt;
Then right-click on it and select''' Run as Administrator.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click''' '''on '''yes'''&lt;br /&gt;
|| If '''prompted, '''click''' '''on the''' Yes '''button in the '''User Account Control''' dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Command Prompt'''&lt;br /&gt;
|| The '''Command Prompt '''opens and the process of '''DSpace rebuild''' begins.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''BUILD SUCCESSFUL '''message&lt;br /&gt;
|| On successful completion,''' BUILD SUCCESSFUL '''message will appear on the '''Command Prompt.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Show closing of '''Command Prompt'''&lt;br /&gt;
|| After the '''rebuild''' process, the '''Command Prompt '''closes automatically.''' '''&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| This means we have '''deployed DSpace email configuration''' on '''Tomcat server.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Next we have to '''configure''' some '''settings''' in the '''Gmail account''' which we have used.&lt;br /&gt;
To access '''Gmail''' through '''DSpace''', '''less secure apps''' in '''Gmail settings''' should be turned '''ON'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [browser] Login to gmail as Email: dspace.u1@gmail.com&lt;br /&gt;
Password: *********&lt;br /&gt;
|| To do so, '''login''' to the respective '''Gmail account''' which you had typed in the '''Email settings''' of '''DSpace'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [browser] Type the url:&lt;br /&gt;
https://www.google.com/settings/security/lesssecureapps https://www.google.com/settings/security/lesssecureapps&lt;br /&gt;
|| Then in the '''address bar''' type the '''URL '''as shown.&lt;br /&gt;
|-&lt;br /&gt;
|  | [browser] Turn the toggle on for Allow less secure apps&lt;br /&gt;
|  | Turn '''ON '''the '''toggle '''button for '''Allow less secure apps.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Open new tab in the browser&lt;br /&gt;
|  | Open a new tab in the '''browser'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | [browser] Type https://accounts.google.com/DisplayUnlockCaptcha&lt;br /&gt;
|  | Enter the '''URL''' as shown to '''configure google account’s access''' to '''DSpace'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Click the '''Continue '''button&lt;br /&gt;
|  | Click the '''Continue '''button.&lt;br /&gt;
|-&lt;br /&gt;
|  | Close tab for '''Less secure app access''' and '''google account access''' tab&lt;br /&gt;
|  | Close the tab for '''Less secure app access''' and '''google account access'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Only narration&lt;br /&gt;
|  | We have now done the required '''configurations'''.&lt;br /&gt;
Next let us send a '''test mail'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Open the '''Command Prompt.'''&lt;br /&gt;
|  | To do so, open the '''Command Prompt.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | [Command Prompt] Type:&lt;br /&gt;
'''cd C:\dspace\bin'''&lt;br /&gt;
|  | Using '''cd command''' switch the '''present working directory''' to '''dspace bin'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Command Prompt] type: &lt;br /&gt;
'''dspace test-email'''&lt;br /&gt;
|  | Then type this '''command''' to send a '''test email'''.&lt;br /&gt;
'''Test email''' will be sent to the '''mail id '''which was set in '''mail.admin '''in '''dspace.cfg '''file.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Browser] Open the gmail account&lt;br /&gt;
|  | Let us cross-verify this.&lt;br /&gt;
&lt;br /&gt;
Switch to the '''browser''' where our '''mail account''' is '''logged''' in.&lt;br /&gt;
&lt;br /&gt;
Now check the '''Inbox''' for the new mail.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Browser] Point to the DSpace test mail&lt;br /&gt;
|  | Here is the '''DSpace test email.'''&lt;br /&gt;
We have successfully '''configured''' the '''mail configuration''' and also sent a '''test mail''' in '''DSpace'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Logout from gmail&lt;br /&gt;
|  | Once done, '''sign out''' from the '''Gmail account. '''&lt;br /&gt;
|-&lt;br /&gt;
|  | Close the '''command prompt'''&lt;br /&gt;
|  | And close the '''command prompt'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Troubleshoot Email Errors&lt;br /&gt;
|  | If you didn’t receive the '''email''' then check the following.&lt;br /&gt;
* Check the '''Spam''' folder&lt;br /&gt;
* Recheck your '''Internet''' connection or&lt;br /&gt;
* The '''Email''' configurations in '''dspace.cfg'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Only Narration&lt;br /&gt;
|  | This brings us to the end of this tutorial.&lt;br /&gt;
Let us summarize.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide Summary&lt;br /&gt;
|  | In this tutorial, we learnt to&lt;br /&gt;
* '''Configure''' '''email '''for '''DSpace'''&lt;br /&gt;
* Prepare a '''Batch '''file to '''rebuild DSpace '''and&lt;br /&gt;
* Send a '''test email''' from '''DSpace'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide : About Spoken Tutorial project&lt;br /&gt;
|  | The video at the following link summarises the '''Spoken Tutorial project.'''&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide : Spoken Tutorial workshops&lt;br /&gt;
|  | The '''Spoken Tutorial Project''' team conducts workshops and gives certificates.&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Answers for THIS Spoken Tutorial&lt;br /&gt;
|| Please post your timed queries in this '''Forum'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Acknowledgement -I&lt;br /&gt;
|  | '''Spoken Tutorial project''' is funded by Ministry of Education (MoE), Government of India.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Acknowledgement -II&lt;br /&gt;
|  | '''DSpace spoken tutorial''' series is funded by the National Virtual Library of India, Ministry of Culture, Government of India.&lt;br /&gt;
|-&lt;br /&gt;
|  | Narration only&lt;br /&gt;
|  | This script and video for this tutorial was contributed by '''Pankaj Patil''' from''' IIT Bombay.'''&lt;br /&gt;
This is '''Nancy Varkey '''signing off. Thanks for joining.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/DSpace/C2/DSpace-Installation-on-Windows-OS/English</id>
		<title>DSpace/C2/DSpace-Installation-on-Windows-OS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/DSpace/C2/DSpace-Installation-on-Windows-OS/English"/>
				<updated>2021-01-13T17:36:02Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Script: Dspace installation on Windows 10 OS'''&lt;br /&gt;
&lt;br /&gt;
'''Author : Pankaj Patil'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: DSpace installation, DSpace build, DSpace deployment, DSpace administrator account, local.cfg configuration, Dspace on Windows 10 OS'''&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|- &lt;br /&gt;
| align=center| '''Visual Cue'''&lt;br /&gt;
| align=center| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Title&lt;br /&gt;
|| Welcome to this spoken tutorial on '''Dspace Installation on Windows 10 OS.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Learning Objectives Slide&lt;br /&gt;
|| In this tutorial, we will learn to &lt;br /&gt;
* '''Install DSpace''' on '''Windows 10 OS'''&lt;br /&gt;
* Crossverify '''DSpace installation''' and&lt;br /&gt;
* Create a '''DSpace administrator account'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: System requirements&lt;br /&gt;
|| This tutorial is recorded using&lt;br /&gt;
* '''Windows 10 64 bit OS'''&lt;br /&gt;
* '''WordPad '''and&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
However you may use any other '''editor''' or '''browser''' of your choice.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| To practice this tutorial, you should have &lt;br /&gt;
* Installed '''Java, Tomcat 8, Postgresql 11, Ant, Maven, and git'''&lt;br /&gt;
* Configured '''Tomcat 8 server '''and &lt;br /&gt;
* Created a '''dspace database '''in''' Postgresql 11.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| &lt;br /&gt;
* If not then please go through the prerequisite tutorials on this website.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| You will also need minimum 5 unique '''email ids''' for practising various '''roles''' in '''DSpace'''.&lt;br /&gt;
If you don’t have, then please create them before proceeding ahead.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Code files&lt;br /&gt;
|| &lt;br /&gt;
* The '''commands''' used in this tutorial are in a file in the '''Code Files '''link on this tutorial page.&lt;br /&gt;
* Please download and extract the file before practicing. &lt;br /&gt;
|- &lt;br /&gt;
|| Switch to '''WordPad '''and open the file&lt;br /&gt;
|| I have opened the '''commands file''' in '''WordPad editor '''on my machine.&lt;br /&gt;
&lt;br /&gt;
And I will use the same file to copy-paste the '''commands''' during the demonstration.&lt;br /&gt;
&lt;br /&gt;
The shortcut to paste on the '''Command Prompt '''is''' Ctrl '''and '''V '''keys'''.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Let us begin.&lt;br /&gt;
First, we will download the '''source code''' for '''DSpace 6.3.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Open a '''web browser'''.&lt;br /&gt;
|| Open a '''web browser'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Browser] Type:&lt;br /&gt;
'''https://github.com/DSpace/DSpace/releases/download/dspace-6.3/dspace-6.3-src-release.zip'''&lt;br /&gt;
|| In the '''address bar''' type the '''URL''' as shown and press '''Enter'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Save file'''&lt;br /&gt;
|| If prompted, click on the '''Save file''' option and then on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|  | Open '''Downloads''' folder&lt;br /&gt;
|  | Go to the place where you have downloaded the file on your machine.&lt;br /&gt;
In my case it is in the '''Downloads folder.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Copy '''dspace-6.3-src-release.zip '''file to '''C''' drive&lt;br /&gt;
|| Copy the '''dspace-6.3-src-release.zip '''file to '''C''' drive.&lt;br /&gt;
|- &lt;br /&gt;
|| Click''' Continue'''&lt;br /&gt;
|| When '''prompted, '''click on the ''' Continue ''' button to provide '''administrator''' permissions for copy.&lt;br /&gt;
|- &lt;br /&gt;
|| Unzip '''dspace-6.3-src-release.zip '''file&lt;br /&gt;
|| Now unzip '''dspace-6.3-src-release.zip '''file using '''7-zip''' as shown. &lt;br /&gt;
|- &lt;br /&gt;
|| Point to folder '''dspace-6.3-src-release '''&lt;br /&gt;
|| The contents of the '''zip '''file are extracted into '''dspace-6.3-src-release '''folder.&lt;br /&gt;
|- &lt;br /&gt;
|| Browse and Point to '''local.cfg.EXAMPLE''' in folder view&lt;br /&gt;
'''C Drive &amp;gt;&amp;gt; dspace-6.3-src-release &amp;gt;&amp;gt; dspace &amp;gt;&amp;gt; config&amp;gt;&amp;gt;local.cfg.EXAMPLE'''&lt;br /&gt;
|| '''DSpace source code''' has '''local.cfg.EXAMPLE, '''which is a sample '''DSpace configuration'''.&lt;br /&gt;
'''DSpace''' checks for the '''configuration''' in the '''local.cfg''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : '''local.cfg''' file&lt;br /&gt;
|| '''local.cfg''' file can be created in two ways:&lt;br /&gt;
# Renaming '''local.cfg.EXAMPLE''' as '''local.cfg'''&lt;br /&gt;
# Copying '''local.cfg.EXAMPLE''' as '''local.cfg'''&lt;br /&gt;
|- &lt;br /&gt;
|| Create copy of '''local.cfg.EXAMPLE '''as '''local.cfg - Copy.EXAMPLE'''&lt;br /&gt;
|| First we’ll make a copy of '''local.cfg.EXAMPLE '''file by pressing '''Ctrl + C''' and then '''Ctrl + V''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Rename '''local.cfg - Copy.EXAMPLE '''file as '''local.cfg.'''&lt;br /&gt;
|| Then rename the '''local.cfg - Copy.EXAMPLE '''file as '''local.cfg.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Yes''' button&lt;br /&gt;
|| Click on the''' Yes''' button to confirm the renaming.&lt;br /&gt;
|- &lt;br /&gt;
|| Open '''local.cfg '''file with '''WordPad'''&lt;br /&gt;
|| Now open the '''local.cfg '''file with '''WordPad editor.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''SERVER CONFIGURATION'''&lt;br /&gt;
|| Locate the '''SERVER CONFIGURATION '''section.&lt;br /&gt;
|- &lt;br /&gt;
|| Enter the path of installation directory&lt;br /&gt;
'''dspace.dir=C:/dspace'''&lt;br /&gt;
|| Here, I have set the values for some '''parameters'''. &lt;br /&gt;
&lt;br /&gt;
Kindly update in your '''configuration''' file also.&lt;br /&gt;
&lt;br /&gt;
'''Webapps '''created during '''dspace installation''' will be stored in''' dspace.dir path'''.&lt;br /&gt;
&lt;br /&gt;
Value for '''dspace.dir''' is''' C:/dspace'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''dspace.ui = xmlui'''&lt;br /&gt;
'''dspace.ui ='''&lt;br /&gt;
|| The default value of '''dspace.ui''' is '''xmlui'''.&lt;br /&gt;
&lt;br /&gt;
We will remove that value and leave it as blank.&lt;br /&gt;
&lt;br /&gt;
'''dspace.ui '''is left blank to enable '''email-based user verification.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Highlight'''&lt;br /&gt;
'''dspace.hostname = localhost'''&lt;br /&gt;
&lt;br /&gt;
'''dspace.baseUrl = http://localhost:8080'''&lt;br /&gt;
&lt;br /&gt;
'''solr.server = http://localhost:8080/solr'''&lt;br /&gt;
&lt;br /&gt;
|| Now suppose we are working on a '''remote machine'''. &lt;br /&gt;
Then set the '''machine ip''' as a value for '''dspace.hostname''', '''dspace.baseUrl '''and '''solr.server.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''DATABASE CONFIGURATION'''&lt;br /&gt;
'''db.username = dspace'''&lt;br /&gt;
'''db.password = dbuserpass'''&lt;br /&gt;
|| Locate '''DATABASE CONFIGURATION '''section.&lt;br /&gt;
Enter the value for '''db.username''' as '''dspace''' and '''db.password''' as '''dbuserpass'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Press '''Ctrl + S '''&amp;gt;&amp;gt; Close File&lt;br /&gt;
|| Save and close the file.&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''cmd''' in search box of '''taskbar'''&lt;br /&gt;
|| Now go to the '''search bar''' located at the bottom left of the '''taskbar.'''&lt;br /&gt;
Then type''' cmd.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Command Prompt'''&lt;br /&gt;
|| Click on the '''Command Prompt application'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| Here onwards please remember to press the '''Enter '''key after typing each '''command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
'''cd C:\dspace-6.3-src-release'''&lt;br /&gt;
|| Using '''cd command''' go to the '''directory dspace-6.3-src-release '''in the '''C''' drive.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
'''mvn -U clean package'''&lt;br /&gt;
|| '''Maven package''' is used to download external''' Java libraries''' and '''build''' the '''source code'''.&lt;br /&gt;
To '''build''' '''DSpace''', type the '''command''' as shown here.&lt;br /&gt;
&lt;br /&gt;
The download may''' '''take some time depending on your '''internet speed'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Highlight:&lt;br /&gt;
'''BUILD SUCCESS''' message&lt;br /&gt;
|| Once the download is complete, '''BUILD SUCCESS''' message will be displayed on the '''command prompt'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Troubleshoot for build failure&lt;br /&gt;
|| In case you get '''BUILD FAILED '''message, do the following-&lt;br /&gt;
* Verify all the steps '''executed''' earlier by referring to the prerequisite tutorials.&lt;br /&gt;
* Also check the version of all the '''packages '''installed.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
'''cd C:\dspace-6.3-src-release\dspace\target\dspace-installer'''&lt;br /&gt;
|| Now, using the '''cd command''' go to the '''directory dspace-installer.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
'''ant fresh_install'''&lt;br /&gt;
|| '''Apache Ant '''is a tool used to '''build DSpace binaries.'''&lt;br /&gt;
To '''install DSpace''' using '''Ant''', type the '''command''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Highlight:&lt;br /&gt;
'''BUILD SUCCESSFUL''' message&lt;br /&gt;
|| Once the '''installation''' is complete, '''BUILD SUCCESSFUL''' message will be displayed on the '''command prompt'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration Only&lt;br /&gt;
|| Next, we will create a '''DSpace administrator account''' and set the '''credentials'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
'''cd C:\dspace\bin'''&lt;br /&gt;
|| Using '''cd command''' change the '''present working directory''' to '''dspace bin directory.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
'''dspace create-administrator'''&lt;br /&gt;
|| Type the '''command''' as shown to create a '''DSpace administrator.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Email: [mailto:dspace.u1@gmail.com dspace.u1@gmail.com]&lt;br /&gt;
First name : User1&lt;br /&gt;
|| Type the values for '''email address''' and '''First name '''as shown.&lt;br /&gt;
These are mandatory '''fields'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Last name : &lt;br /&gt;
|| I’m skipping the '''Last name '''field.&lt;br /&gt;
|- &lt;br /&gt;
|| Password : u1pass&lt;br /&gt;
|| Now '''set''' the '''password''' for the '''dspace admin account.'''&lt;br /&gt;
I will type '''u1pass''' and press '''Enter'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Retype the admin password&lt;br /&gt;
Password: u1pass&lt;br /&gt;
|| Type the '''password '''once again and press '''Enter.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''Y''' to confirm entered details.&lt;br /&gt;
|| The '''prompt''' will ask us to type '''Y''' to confirm the newly added details.&lt;br /&gt;
Type '''Y''' and press '''Enter'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| '''Administrator’s credentials''' are used to '''login''' to the '''DSpace portal''' with '''Administrator authority.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Close the '''Command Prompt'''&lt;br /&gt;
|| Close the '''command prompt'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Now, let us proceed to '''deploy dspace webapps '''on''' Tomcat.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| '''Administrative privileges''' are required to '''deploy webapps'''.&lt;br /&gt;
Therefore, let us open the '''command prompt '''with''' Administrative privileges.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''cmd''' in search box of '''taskbar'''&lt;br /&gt;
|| Go to the '''search bar''' located at the bottom left of the '''taskbar.'''&lt;br /&gt;
Then type''' cmd.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Right Click on '''Command Prompt -&amp;gt; Run as administrator'''&lt;br /&gt;
|| From the displayed list, right-click on '''Command Prompt application''' and select '''Run as administrator.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click''' '''on '''yes'''&lt;br /&gt;
|| If '''prompted, '''click''' '''on the''' Yes '''button in the '''User Account Control''' dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Administrator:Command Prompt'''&lt;br /&gt;
|| '''Command Prompt''' opens with the '''administrator privileges'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
'''cd C:\Program Files\Apache Software Foundation\Tomcat 8.5\webapps'''&lt;br /&gt;
|| Type the '''command''' as shown to navigate to '''Tomcat webapps.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type: '''dir'''&lt;br /&gt;
|| Type''' dir '''to see the folder contents.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''ROOT '''directory''' '''&lt;br /&gt;
|| '''ROOT '''is the default''' webapp '''created during '''Tomcat installation'''.''' '''&lt;br /&gt;
'''Tomcat server''' redirects '''client requests''' to default '''ROOT''' '''webapp'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
'''rename ROOT DEFAULT_ROOT '''&lt;br /&gt;
|| For '''DSpace''', we need to '''set''' up '''JSPUI''' as a '''ROOT web app'''.&lt;br /&gt;
&lt;br /&gt;
Therefore, we will rename''' '''the '''ROOT '''as '''DEFAULT_ROOT.'''&lt;br /&gt;
&lt;br /&gt;
To do so, type the '''command''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Now, we will '''deploy DSpace webapps''' on '''Tomcat.'''&lt;br /&gt;
'''DSpace''' offers '''JSP''' and '''XML''' based '''user interfaces'''. &lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
'''mklink /D ROOT C:\dspace\webapps\jspui'''&lt;br /&gt;
|| We will '''deploy DSpace''' with the '''JSPUI interface''' as default.&lt;br /&gt;
To do so, type the '''command''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| '''mklink /D rest C:\dspace\webapps\rest'''&lt;br /&gt;
|| Next we’ll '''deploy rest webapp,''' by typing the '''command''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| '''mklink /D solr C:\dspace\webapps\solr'''&lt;br /&gt;
|| Now, we will '''deploy solr webapp,''' by typing this '''command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| '''mklink /D oai C:\dspace\webapps\oai'''&lt;br /&gt;
|| Next, to '''deploy oai webapp,''' type the '''command''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| '''mklink /D sword C:\dspace\webapps\sword'''&lt;br /&gt;
|| Lastly, we’ll '''deploy sword webapp,''' by typing this '''command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration Only&lt;br /&gt;
|| Now, let us '''restart Tomcat server'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
'''cd C:\Program Files\Apache Software Foundation\Tomcat 8.5\bin'''&lt;br /&gt;
|| Using '''cd command''' change '''present working directory''' to '''Tomcat bin.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
'''Tomcat8.exe stop'''&lt;br /&gt;
|| To stop the '''Tomcat server''' type the '''command''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
'''Tomcat8.exe start'''&lt;br /&gt;
|| To start the '''Tomcat server''' type the '''command''' as shown.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| If '''tomcat''' is not '''restart'''ed''', '''then the '''deployed applications''' will not be effective to handle '''client requests.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Restart the System&lt;br /&gt;
|| Finally, '''restart''' the system before accessing '''DSpace'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| We have now successfully '''installed DSpace.'''&lt;br /&gt;
Next, let us proceed to access '''DSpace''' through the '''web browser.'''&lt;br /&gt;
|- &lt;br /&gt;
|| '''Browser &amp;gt;&amp;gt;'''&lt;br /&gt;
'''http://localhost:8080'''&lt;br /&gt;
|| Open a '''web browser'''.&lt;br /&gt;
Type '''http://localhost:8080''' in the '''address bar'''.&lt;br /&gt;
&lt;br /&gt;
If you have '''set''' any '''ip address''' in the '''configuration''', then type that '''ip''' instead of '''localhost'''.&lt;br /&gt;
&lt;br /&gt;
And press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
The '''DSpace home page''' appears on the '''browser'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Now, we will '''login''' to '''DSpace''' with our '''administrator account'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click''' Sign on to tab &amp;gt; My DSpace'''&lt;br /&gt;
|| Click on '''Sign on to '''tab at the top right corner.&lt;br /&gt;
Select '''My DSpace''' from the drop-down.&lt;br /&gt;
&lt;br /&gt;
The form '''Log In to''' '''DSpace''' opens.&lt;br /&gt;
|- &lt;br /&gt;
|| Enter Email Address and Password&lt;br /&gt;
Email: dspace.u1@gmail.com&lt;br /&gt;
Password: u1pass&lt;br /&gt;
|| Type in the '''email address''' and '''password''' of the '''administrator'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on''' Log In '''button&lt;br /&gt;
|| Then click on the '''Log In''' button below the '''password''' field.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''My DSpace '''section&lt;br /&gt;
|| The '''administrator login''' is successful and '''My DSpace''' page appears.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Now, let us '''log out''' this '''user''' from '''DSpace'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Logged in '''tab in the top right corner&lt;br /&gt;
|| Click on the '''Logged in '''tab at the top right corner.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''Logout '''from drop down&lt;br /&gt;
|| Select '''Logout '''from the drop-down.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Logged out '''message&lt;br /&gt;
|| The '''user''' has been '''logged out'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| This brings us to the end of this tutorial.&lt;br /&gt;
Let us summarize.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide : Summary&lt;br /&gt;
|  | In this tutorial, we learnt to-&lt;br /&gt;
* '''Install DSpace''' on''' Windows 10 OS '''&lt;br /&gt;
* Crossverify '''DSpace installation''' and&lt;br /&gt;
* Create a '''DSpace administrator account'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide : About Spoken Tutorial project&lt;br /&gt;
|  | The video at the following link summarises the '''Spoken Tutorial project.'''&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide : Spoken Tutorial workshops&lt;br /&gt;
|  | The '''Spoken Tutorial Project''' team conducts workshops and gives certificates.&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Answers for THIS Spoken Tutorial&lt;br /&gt;
|| Please post your timed queries in this Forum.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Acknowledgement -I&lt;br /&gt;
|  | '''Spoken Tutorial project''' is funded by Ministry of Education (MoE), Government of India.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Acknowledgement -II&lt;br /&gt;
|  | '''DSpace spoken tutorial''' series is funded by the National Virtual Library of India, Ministry of Culture, Government of India.&lt;br /&gt;
|-&lt;br /&gt;
|  | Narration only&lt;br /&gt;
|  | This script and video for this tutorial was contributed by '''Pankaj Patil''' from''' IIT Bombay.'''&lt;br /&gt;
And this is Nancy Varkey signing off. Thanks for joining.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/DSpace/C2/Setting-up-Tomcat-and-Postgresql-on-Windows-OS/English</id>
		<title>DSpace/C2/Setting-up-Tomcat-and-Postgresql-on-Windows-OS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/DSpace/C2/Setting-up-Tomcat-and-Postgresql-on-Windows-OS/English"/>
				<updated>2021-01-13T16:00:44Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Script: Setting Tomcat and Postgresql on Windows 10'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Author : Pankaj Patil'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: Tomcat Installation, Tomcat8 installation on Windows 10, postgresql installation, Configure tomcat server, Create DSpace database'''&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|- &lt;br /&gt;
| align=center| '''Visual Cue'''&lt;br /&gt;
| align=center| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Title&lt;br /&gt;
|| Welcome to this spoken tutorial on '''Setting up Tomcat and Postgresql on Windows 10.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Learning Objectives Slide&lt;br /&gt;
|| In this tutorial, we will learn to &lt;br /&gt;
* '''Install '''and '''configure Tomcat 8'''&lt;br /&gt;
* '''Install Postgresql 11'''&lt;br /&gt;
* Create''' dspace database''' in''' Postgresql 11'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: System requirements&lt;br /&gt;
|| This tutorial is recorded using&lt;br /&gt;
* '''Windows 10 64 bit OS'''&lt;br /&gt;
* '''WordPad '''and&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
However you may use any other '''editor''' or '''browser''' of your choice.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| To practice this tutorial, &lt;br /&gt;
* You should have an '''internet''' connection to '''install''' the necessary '''packages '''&lt;br /&gt;
* You should also have '''installed 7Zip file archiver'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| &lt;br /&gt;
* '''Environment Variables''' for''' Java, Ant, '''and''' Maven '''should be '''set''' as well&lt;br /&gt;
* If not then please go through the prerequisite tutorials on this website.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Code files&lt;br /&gt;
|| &lt;br /&gt;
* The '''commands''' used in this tutorial are in a file in the '''Code Files '''link on this tutorial page.&lt;br /&gt;
* Please download and extract the file before practicing.&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to '''WordPad '''and open the file&lt;br /&gt;
|| I have opened the '''commands file''' in '''WordPad editor '''on my machine.&lt;br /&gt;
And I will use the same file to copy-paste the '''commands''' during the demonstration.&lt;br /&gt;
&lt;br /&gt;
The shortcut to paste on the '''Command Prompt '''is''' Ctrl '''and '''V '''keys'''.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Generally, '''DSpace''' is deployed on '''Tomcat8 server'''.&lt;br /&gt;
Let us now '''install Apache tomcat 8.'''&lt;br /&gt;
&lt;br /&gt;
Open a '''web browser.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [Browser] Type:&lt;br /&gt;
'''https://downloads.apache.org/tomcat/tomcat-8/v8.5.60/bin/apache-tomcat-8.5.60.exe'''&lt;br /&gt;
|| In the '''address bar''', type the '''URL '''as shown to download '''Apache tomcat 8 installer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Save file'''&lt;br /&gt;
|| If prompted, click on the '''Save file''' button to download the '''installer'''.&lt;br /&gt;
The download begins in the default '''downloads folder'''.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
Open''' Downloads''' folder&lt;br /&gt;
Double click on '''Tomcat''' installer&lt;br /&gt;
|| Go to the place where you have downloaded the file on your machine.&lt;br /&gt;
In my case, it is in the '''Downloads folder.'''&lt;br /&gt;
&lt;br /&gt;
Double-click on the '''Tomcat installer''' file.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Yes'''&lt;br /&gt;
|| In the '''User Account Control''' dialog box, click on '''Yes '''or''' Run '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Next '''button&lt;br /&gt;
|| In the '''Setup''' dialog box, click on the '''Next '''button to continue. &lt;br /&gt;
|- &lt;br /&gt;
|| Click '''I Agree '''button&lt;br /&gt;
|| Click on the '''I Agree '''button to accept the terms of agreement.&lt;br /&gt;
|- &lt;br /&gt;
|| Click''' Next '''button&lt;br /&gt;
|| To proceed with the default components selection, click the '''Next '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Click''' Next '''button&lt;br /&gt;
|| Click the '''Next '''button to continue the '''installation''' with basic '''configurations'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click''' Next '''button&lt;br /&gt;
|| Keep the default '''path''' of '''JRE '''and click on the '''Next '''button to continue.&lt;br /&gt;
|- &lt;br /&gt;
|| Click''' Install '''button&lt;br /&gt;
|| Keep the default '''path''' for '''Tomcat installation''' and click on the '''Install '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| The '''installation''' is successfully completed.&lt;br /&gt;
|- &lt;br /&gt;
|| Uncheck checkbox of '''Show Readme''' and click '''Finish''' button&lt;br /&gt;
|| Uncheck the '''Show Readme''' option.&lt;br /&gt;
And click on the '''Finish''' button to close the dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| '''Apache Tomcat service''' begins.&lt;br /&gt;
Now let us '''configure Tomcat '''to start on '''system restart'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''Control Panel''' in search box of '''taskbar'''&lt;br /&gt;
|| Go to the '''search bar''' located at the bottom left of the '''taskbar.'''&lt;br /&gt;
Then type''' “Control Panel”'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Control Panel''' Application&lt;br /&gt;
|| Click on the '''Control Panel''' application.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''System and Security '''settings -&amp;gt; '''Administrative Tools'''&lt;br /&gt;
|| Next, go to '''System and Security settings''' and then on the '''Administrative Tools''' menu.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Administrative Tools''' &lt;br /&gt;
|| '''Administrative Tools''' dialog box opens up.&lt;br /&gt;
|- &lt;br /&gt;
|| Double Click on '''Services'''&lt;br /&gt;
|| Double-click on '''Services'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Locate '''Apache Tomcat''' service and Right click on it&lt;br /&gt;
Select '''Properties'''&lt;br /&gt;
|| Locate '''Apache Tomcat service.''' &lt;br /&gt;
Then right-click and select '''Properties.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to Window&lt;br /&gt;
|| '''Apache Tomcat8 properties''' dialog box opens up.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on dropdown of '''Startup''' '''type -&amp;gt; '''Choose '''Automatic'''&lt;br /&gt;
|| Click on the '''Startup type '''drop-down and select '''Automatic '''from the list.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Apply''' button&lt;br /&gt;
|| Click the '''Apply''' button and then on the '''OK '''button at the bottom right corner of the window.&lt;br /&gt;
|- &lt;br /&gt;
|| Close '''Service, Administrative Tools, Control''' '''Panel''' window&lt;br /&gt;
|| Now, close the '''Services, Administrative Tools, '''and '''Control''' '''Panel''' windows.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| So, we have installed '''Tomcat '''and '''configured''' it.&lt;br /&gt;
Next let us '''install postgresql'''.&lt;br /&gt;
&lt;br /&gt;
Switch back to the '''browser.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [Browser] Type:&lt;br /&gt;
https://www.enterprisedb.com/downloads/postgres-postgresql-downloads https://www.enterprisedb.com/downloads/postgres-postgresql-downloads&lt;br /&gt;
|| In the '''address bar''' type the '''URL''' as shown to view the '''installer packages''' of '''postgresql'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click download button for '''version 11.10''' and''' 64 bit OS'''&lt;br /&gt;
|| Download the '''postgresql''' version 11.10 for '''Windows 64 bit OS'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Save file'''&lt;br /&gt;
|| If prompted, click on the '''Save file''' button to download the '''installer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Open '''Downloads''' folder&lt;br /&gt;
|| Once again go to the '''Downloads''' folder.&lt;br /&gt;
|- &lt;br /&gt;
|| Right-click on the '''postgresql installer''' and select '''Run as administrator'''&lt;br /&gt;
|| Right-click on the '''postgresql installer''' and select '''Run as administrator'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Yes'''&lt;br /&gt;
|| In the '''User Account Control''' dialog box, click on '''Yes '''or''' Run '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Click Next to begin installation process&lt;br /&gt;
|| Click on the '''Next '''button to begin the '''installation''' process.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Next''' button&lt;br /&gt;
|| Keep the default settings for '''Installation location''' and click on the '''Next '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Next''' button&lt;br /&gt;
|| Keep the default selected components and click on the '''Next '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Next''' button&lt;br /&gt;
|| Keep the default '''Data directory''' and click on the '''Next '''button.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
Enter the Password as&lt;br /&gt;
‘'''root’'''&lt;br /&gt;
Retype the same password&lt;br /&gt;
|| In the '''password setup''' page, set the '''root user password.'''&lt;br /&gt;
I will type my '''password''' as ‘'''root’.'''&lt;br /&gt;
&lt;br /&gt;
Retype the same password to confirm it.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Next''' button repeatedly&lt;br /&gt;
|| Then, Click the '''Next''' button repeatedly to '''install postgresql '''with the default '''configuration'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Uncheck Checkbox of View release notes&lt;br /&gt;
|| Once the '''installation''' is over, uncheck the checkbox of “'''stack builder'''”.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Finish '''button&lt;br /&gt;
|| Then click the '''Finish''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Now let us create a '''database''' and a '''user''' for it.&lt;br /&gt;
|- &lt;br /&gt;
|| Type '''pgadmin4''' in search box of '''taskbar'''&lt;br /&gt;
|| Go to the '''search bar''' located at the bottom left of the '''taskbar.'''&lt;br /&gt;
Then type''' pgadmin4.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''pgadmin4'''&lt;br /&gt;
|| Click on the '''pgadmin4 '''application.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| '''pgAdmin '''is a management tool for '''PostgreSQL'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point t o the '''pgAdmin''' page in the browser&lt;br /&gt;
|| '''pgAdmin '''page''' '''opens in the default '''web browser'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to Set Master Password&lt;br /&gt;
|| It might prompt us to '''set''' the '''master password''' for '''pgAdmin'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Type password as '''‘root’ '''and''' '''Click '''OK''' button &lt;br /&gt;
|| I will set the '''password''' as '''‘root’''' and click on the '''OK''' button&lt;br /&gt;
|- &lt;br /&gt;
|| Double click on '''Servers '''in the left panel&lt;br /&gt;
|| On the left panel, double-click on '''Servers.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Enter password of the '''postgres '''user: '''root'''&lt;br /&gt;
Click '''OK''' button &lt;br /&gt;
|| Type the '''postgres user password''' to connect to the '''database server''' and click on the '''OK''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Now let us create a '''user''' for the '''database'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Right click on '''Login/Group Roles''' under '''PostgreSQL 11'''&lt;br /&gt;
|| In the left panel, under '''PostgreSQL 11''' right-click on the '''Login/Group Roles.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''Create '''option -&amp;gt; '''Login/Group Roles''' option&lt;br /&gt;
|| From the context menu, select '''Create '''and then on '''Login/Group Roles''' option.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Create- Login/Group Roles'''&lt;br /&gt;
|| A Pop-up window opens up to create a '''user''' for the '''database'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Enter Name&lt;br /&gt;
'''dspace'''&lt;br /&gt;
|| Under '''General''' tab, type the name of the '''database user''' in the '''Name''' field.&lt;br /&gt;
So, I will type '''dspace'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Definition''' tab&lt;br /&gt;
|| Click on the '''Definition''' tab.&lt;br /&gt;
|- &lt;br /&gt;
|| Enter Password&lt;br /&gt;
'''dbuserpass'''&lt;br /&gt;
|| In the '''Password '''field, type the password for the '''database user. '''&lt;br /&gt;
I will type '''dbuserpass'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Privileges''' tab&lt;br /&gt;
|| Now, go to the '''Privileges''' tab.&lt;br /&gt;
|- &lt;br /&gt;
|| Toggle buttons to change all values to '''Yes'''&lt;br /&gt;
|| To provide all '''privileges''' to the '''user''', toggle the buttons and change all the values to '''Yes.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Save''' button&lt;br /&gt;
|| Then click on the '''Save''' button and close the pop-up window.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Now let us create a database named '''dspace.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Right click on '''Login/Group Roles''' under '''Databases'''&lt;br /&gt;
|| In the left panel, under '''PostgreSQL 11''' right-click on the '''Databases.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''Create '''option -&amp;gt; '''Database''' option&lt;br /&gt;
|| From the context menu, select '''Create '''and then on '''Database''' option.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Create- Database'''&lt;br /&gt;
|| A pop-up window opens up to create a '''database'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Enter name of the database&lt;br /&gt;
Type: '''dspace'''&lt;br /&gt;
|| Under the '''General''' tab, type the name of the '''database'''.&lt;br /&gt;
I will type '''dspace'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on dropdown next to '''owner '''field&lt;br /&gt;
|| Click on the drop-down next to the '''owner '''field. &lt;br /&gt;
A list of '''database users''' is seen.&lt;br /&gt;
|- &lt;br /&gt;
|| Select '''dspace'''&lt;br /&gt;
|| Select '''dspace '''as the '''owner''' of this '''database'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Definition''' tab&lt;br /&gt;
|| Go to the '''Definition''' tab.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on dropdown next to '''Tablespace''' field -&amp;gt; Select '''pg_default'''&lt;br /&gt;
|| Click on the drop-down next to the '''Tablespace''' field and select '''pg_default'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Save''' button&lt;br /&gt;
|| Then click on the '''Save''' button and close the pop-up window.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''dspace''' under '''Databases'''.&lt;br /&gt;
|| In the left panel, under '''PostgreSQL 11, '''under''' Databases, '''we see the newly created '''database dspace.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''dspace''' database.&lt;br /&gt;
|| Click on the '''dspace database'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: '''pgcrypto extension'''&lt;br /&gt;
|| We will now add a '''pgcrypto extension''' to the '''DSpace database.'''&lt;br /&gt;
'''pgcrypto extension''' allows '''DSpace''' to create universally unique '''identifiers''' for all '''objects''' in '''DSpace'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the arrow adjacent to the '''dspace''' database&lt;br /&gt;
|| If submenus are not shown, Expand the '''dspace database''' by clicking on the arrow adjacent to it.&lt;br /&gt;
|- &lt;br /&gt;
|| Right click on '''Extensions'''&lt;br /&gt;
'''Create -&amp;gt; Extensions'''&lt;br /&gt;
|| Right-click on '''Extensions.'''&lt;br /&gt;
Then from the context menu, select '''Create''' and then click on '''Extensions.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to &amp;lt;span style=&amp;quot;color:#3c4043;&amp;quot;&amp;gt;'''Create Extensions'''&lt;br /&gt;
|| &amp;lt;span style=&amp;quot;color:#3c4043;&amp;quot;&amp;gt;The &amp;lt;span style=&amp;quot;color:#3c4043;&amp;quot;&amp;gt;'''Create Extensions'''&amp;lt;span style=&amp;quot;color:#3c4043;&amp;quot;&amp;gt; pop-up opens up.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on dropdown next to '''Name''' field&lt;br /&gt;
|| Under the '''General''' tab, click on the drop-down next to the '''Name '''field. &lt;br /&gt;
|- &lt;br /&gt;
|| Select '''pgcrypto'''&lt;br /&gt;
|| Scroll and select '''pgcrypto''' as an''' Extension.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Save''' button&lt;br /&gt;
|| Then click on the '''Save''' button and close the pop-up window.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| '''Pgcrypto '''extension is created.&lt;br /&gt;
|- &lt;br /&gt;
|| Close the '''pgAdmin4 '''tab&lt;br /&gt;
Restart the System&lt;br /&gt;
|| Close the '''pgAdmin4 '''tab and '''restart''' the system to bring all '''configurations '''into effect.&lt;br /&gt;
|- &lt;br /&gt;
|| Only narration&lt;br /&gt;
|| So now, we have installed '''postgresql '''and created a '''dspace database'''.&lt;br /&gt;
Let us summarize.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide : Summary&lt;br /&gt;
|  | In this tutorial, we learnt to-&lt;br /&gt;
* '''Install '''and '''configure Tomcat 8'''&lt;br /&gt;
* '''Install Postgresql 11'''&lt;br /&gt;
* Create''' dspace database''' in''' Postgresql 11'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide : About Spoken Tutorial project&lt;br /&gt;
|  | The video at the following link summarises the '''Spoken Tutorial project.'''&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide : Spoken Tutorial workshops&lt;br /&gt;
&lt;br /&gt;
|  | The '''Spoken Tutorial Project''' team conducts workshops and gives certificates.&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Answers for THIS Spoken Tutorial&lt;br /&gt;
|| Please post your timed queries in this Forum.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Acknowledgement -I&lt;br /&gt;
|  | '''Spoken Tutorial project''' is funded by Ministry of Education (MoE), Government of India.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Acknowledgement -II&lt;br /&gt;
|  | '''DSpace spoken tutorial''' series is funded by the National Virtual Library of India, Ministry of Culture, Government of India.&lt;br /&gt;
|-&lt;br /&gt;
|  | Narration only&lt;br /&gt;
|  | This script and video for this tutorial was contributed by '''Pankaj Patil''' from''' IIT Bombay.'''&lt;br /&gt;
And this is '''Nancy Varkey''' signing off. &lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/DSpace/C2/Installation-of-JDK-and-Build-tool-on-Windows-OS/English</id>
		<title>DSpace/C2/Installation-of-JDK-and-Build-tool-on-Windows-OS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/DSpace/C2/Installation-of-JDK-and-Build-tool-on-Windows-OS/English"/>
				<updated>2021-01-13T15:41:07Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Script: Install JDK and Build tools on Windows 10'''&lt;br /&gt;
&lt;br /&gt;
'''Author : Pankaj Patil'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: DSpace installation on Windows, Install JDK, install Java, install Maven, install Ant, install git, Set Environment variables, Set Path variables'''&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|- &lt;br /&gt;
| align=center| '''Visual Cue'''&lt;br /&gt;
| align=center| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Title&lt;br /&gt;
|| Welcome to this spoken tutorial on '''Install JDK and Build tools on Windows 10.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Learning Objectives Slide&lt;br /&gt;
|| In this tutorial, we will learn to &lt;br /&gt;
* '''Install Java, Ant, Maven '''and''' git '''and&lt;br /&gt;
* '''Set Environment variables''' for '''Java, Ant, '''and''' Maven'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: System requirements&lt;br /&gt;
|| This tutorial is recorded using&lt;br /&gt;
* '''Windows 10 64 bit OS'''&lt;br /&gt;
* '''WordPad '''and&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''editor''' or '''web''' '''browser''' of your choice.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| To practice this tutorial, &lt;br /&gt;
* You should have an '''internet''' connection to '''install''' the necessary '''packages '''&lt;br /&gt;
* You should also have '''installed 7Zip file archiver'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
&lt;br /&gt;
'''https://www.7-zip.org'''&lt;br /&gt;
|| &lt;br /&gt;
* If not, then download and '''install''' it using this '''URL'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Hardware requirements&lt;br /&gt;
|| The minimum hardware requirements for '''DSpace installation''' are&lt;br /&gt;
* '''i3 processor''' or above&lt;br /&gt;
* '''100GB hard disk''' or more&lt;br /&gt;
* '''4GB RAM''' or above &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Code files&lt;br /&gt;
|| &lt;br /&gt;
* The '''commands''' used in this tutorial are in a file in the '''Code Files '''link on this tutorial page.&lt;br /&gt;
* Please download and extract the file before practicing.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to '''WordPad '''and open the file&lt;br /&gt;
|| I have opened the '''commands file''' in '''WordPad editor '''on my machine.&lt;br /&gt;
&lt;br /&gt;
And I will use the same file to copy-paste the '''commands''' during the demonstration.&lt;br /&gt;
&lt;br /&gt;
The shortcut to paste on the '''Command Prompt '''is''' Ctrl '''and '''V '''keys'''.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| To install '''DSpace''', it is mandatory to have basic '''packages''' like '''Java, Ant, Maven '''and''' git.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Now, let us begin by '''installing''' the '''Java Development Kit.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Open web browser&lt;br /&gt;
|  | Open a '''web browser'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Browser] Type:&lt;br /&gt;
&lt;br /&gt;
'''https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html'''&lt;br /&gt;
|  | In the '''address bar''', type the '''URL '''as shown to view '''JDK8 installers''' available from '''Oracle'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Locate and highlight&lt;br /&gt;
&lt;br /&gt;
'''jdk-8u271-windows-x64.exe'''&lt;br /&gt;
|| Locate the '''installer file''' for '''Windows 64''' bit.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  | Highlight '''u271'''&lt;br /&gt;
|  | '''u271''' in the '''installation file''' name, is the '''release number''', which may be different in your case.&lt;br /&gt;
|- &lt;br /&gt;
|  | Highlight '''x64'''&lt;br /&gt;
|  | '''x64''' in the '''installation file''' name, indicates '''64-bit operating system'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Installer for '''32 bit Windows OS'''&lt;br /&gt;
|| If you are using a '''32-bit operating system''', then you should download the '''installer''' for '''32-bit OS'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Switch back to browser&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Click on the link '''jdk-8u271-windows-x64.exe'''&lt;br /&gt;
|| My machine is a '''64-bit OS'''. &lt;br /&gt;
&lt;br /&gt;
So, I will download '''jdk-8u271-windows-x64.exe.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to Pop-up window&lt;br /&gt;
|| A pop-up window opens up to accept the '''license agreement'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Check the checkbox of license agreement&lt;br /&gt;
&lt;br /&gt;
Click on the button''' Download jdk-8u271-windows-x64.exe'''&lt;br /&gt;
|| Check the checkbox of the '''license agreement'''.&lt;br /&gt;
&lt;br /&gt;
And click on the button''' Download jdk-8u271-windows-x64.exe'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to''' Oracle '''sign in&lt;br /&gt;
|  | We will be redirected to the '''Oracle login page.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| If you do not have an '''Oracle account''', please create an account and then log into '''Oracle.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Enter Username : '''dspace.u1@gmail.com'''&lt;br /&gt;
&lt;br /&gt;
Password:''' **********'''&lt;br /&gt;
|| I will enter the '''username''' and '''password''' of my '''Oracle account'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Save file'''&lt;br /&gt;
|| If prompted, click on the '''Save file''' button to download the '''installer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to downloading of '''jdk-8u271-windows-x64.exe'''&lt;br /&gt;
|| The '''installation file''' will get downloaded in the default '''downloads directory'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Open '''Downloads''' folder&lt;br /&gt;
|| Go to the place where you have downloaded the file on your machine.&lt;br /&gt;
&lt;br /&gt;
In my case it is in the '''Downloads folder.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Double click on '''jdk-8u271-windows-x64.exe'''&lt;br /&gt;
|| Double-click on the '''jdk-8u271-windows-x64.exe,''' to begin the '''installation'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click on '''Yes'''&lt;br /&gt;
|| In the '''User Account Control''' dialog box, click on the '''Yes '''or''' Run '''button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''Next '''button&lt;br /&gt;
|  | In the '''Setup''' dialog box, click the '''Next''' button to continue the installation process.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Development Tools'''&lt;br /&gt;
&lt;br /&gt;
Click '''Next''' button&lt;br /&gt;
|| In the '''Custom Setup''' page, ensure that''' Development Tools '''is selected for '''installation. '''&lt;br /&gt;
&lt;br /&gt;
Click the '''Next '''button to continue.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to I'''nstall to:'''&lt;br /&gt;
|| Another dialog box opens up to select the '''installation folder'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to''' C:\Program Files\Java\jre1.8.0_271'''&lt;br /&gt;
|| The installation path is set to '''C:\Program Files\Java\jre1.8.0_271.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Change''' button&lt;br /&gt;
|| If you wish to change the '''path''', click on the '''Change''' button.&lt;br /&gt;
&lt;br /&gt;
I don’t wish to change the '''path''', so I will not be clicking.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''Next''' button&lt;br /&gt;
|| Click on the '''Next '''button to continue.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| '''JDK '''installation has begun. &lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| '''Installation''' is successfully completed now.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Close''' button&lt;br /&gt;
|| Click on the '''Close''' button to close the dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|  | Only Narration&lt;br /&gt;
|| Now, let us install '''Apache Maven''', which is used to '''build DSpace source code'''. &lt;br /&gt;
|- &lt;br /&gt;
|  | Switch back to browser&lt;br /&gt;
|| Switch back to the '''browser'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Browser] Type:&lt;br /&gt;
'''https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip'''&lt;br /&gt;
|| In the '''address bar''' type the '''URL''' as shown.&lt;br /&gt;
This will download '''Apache Maven 3.6.3'''&lt;br /&gt;
|- &lt;br /&gt;
|| Select “Save File” -&amp;gt; OK&lt;br /&gt;
|| If prompted, click on the '''Save file''' option and then on the '''OK''' button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Switch back to '''Downloads''' folder&lt;br /&gt;
|  | Switch back to the '''Downloads''' folder.&lt;br /&gt;
|- &lt;br /&gt;
|  | Copy '''apache-maven-3.6.3-bin.zip '''file to '''C drive'''&lt;br /&gt;
|  | Copy the file '''apache-maven-3.6.3-bin.zip '''to '''C drive'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click''' Continue'''&lt;br /&gt;
|| If '''prompted, '''click on''' Continue '''to provide '''administrator permissions''' for copying.&lt;br /&gt;
|- &lt;br /&gt;
|| Right click on&lt;br /&gt;
&lt;br /&gt;
'''apache-maven-3.6.3-bin zip '''-&amp;gt;''' 7-Zip'''&lt;br /&gt;
&lt;br /&gt;
Select '''Extract Here'''&lt;br /&gt;
|| Right-click on the file''' apache-maven-3.6.3-bin zip '''&lt;br /&gt;
&lt;br /&gt;
From the context menu, select '''7-Zip'''&lt;br /&gt;
&lt;br /&gt;
Then from the sub-menu, select '''Extract Here.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Narration only&lt;br /&gt;
|  | The file extraction begins.&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to '''apache-maven-3.6.3 '''folder&lt;br /&gt;
|  | The '''zipped''' contents are extracted in the '''apache-maven-3.6.3 '''folder.&lt;br /&gt;
|- &lt;br /&gt;
|  | Double click on the '''apache-maven-3.6.3 '''folder&lt;br /&gt;
|  | Open the folder '''apache-maven-3.6.3 '''by double-clicking on it.&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to path '''C:\apache-maven-3.6.3'''&lt;br /&gt;
|  | The extracted contents '''bin, boot, conf, lib''' are located in the path '''C:\apache-maven-3.6.3.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Only Narration&lt;br /&gt;
|  | In case the contents are extracted to any other folder, move them to this folder.&lt;br /&gt;
|- &lt;br /&gt;
|  | Only Narration&lt;br /&gt;
|  | Next, we will install the '''Apache Ant '''tool,''' '''which''' '''is used to install '''DSpace'''. &lt;br /&gt;
|- &lt;br /&gt;
|| [Browser] Type:&lt;br /&gt;
&lt;br /&gt;
'''https://downloads.apache.org/ant/binaries/apache-ant-1.10.9-bin.zip'''&lt;br /&gt;
|| Switch back to the '''browser'''.&lt;br /&gt;
&lt;br /&gt;
In the '''address bar''' type the '''URL''' as shown to download '''Apache Ant'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select “Save File” -&amp;gt; OK&lt;br /&gt;
|| If prompted, click on the '''Save file''' option and then on the '''OK''' button&lt;br /&gt;
|- &lt;br /&gt;
|  | Switch back to '''Downloads''' folder&lt;br /&gt;
|  | Switch back to the '''Downloads''' folder.&lt;br /&gt;
|- &lt;br /&gt;
|  | Copy and extract''' apache-ant-1.10.9-bin.zip '''file in C drive&lt;br /&gt;
|  | Like '''Maven''', copy and extract''' '''the file '''apache-ant-1.10.9-bin.zip '''to '''C''' '''drive'''. &lt;br /&gt;
|- &lt;br /&gt;
|  | Point to path '''C:\apache-ant-1.10.9'''&lt;br /&gt;
|  | Extracted contents '''bin, etc, lib, manual''' are located in the path''' C:\apache-ant-1.10.9.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Narration only&lt;br /&gt;
|  | Now let us set '''path variables''' for '''Java, Ant''' and '''Maven'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Go to '''This PC'''&lt;br /&gt;
|| Go to '''My Computer''' or '''This PC.'''&lt;br /&gt;
&lt;br /&gt;
Right-click on the empty area and select '''Properties.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Click on '''Advanced system settings'''&lt;br /&gt;
|  | Then click on the '''Advanced system settings '''from the left panel.&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to the '''Advanced''' tab&lt;br /&gt;
|  | In the '''System Properties''' dialog box, make sure that the '''Advanced''' tab is selected.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''Environment Variables '''button&lt;br /&gt;
|  | In the '''Advanced '''settings, click on the '''Environment Variables '''button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''New '''button&lt;br /&gt;
|  | In the '''Environment Variables '''dialog box, click on the '''New '''button in the '''User variable '''section.&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to '''New User Variable '''dialog box&lt;br /&gt;
|  | '''New User Variable''' dialog box opens up.&lt;br /&gt;
|- &lt;br /&gt;
|  | Narration only&lt;br /&gt;
|  | Let us create a '''user variable''' for '''JDK'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Enter variable name as '''JAVA_HOME'''&lt;br /&gt;
|  | Type the '''variable''' name as '''JAVA_HOME.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Variable value''' field&lt;br /&gt;
&lt;br /&gt;
Point to '''Browse Directory''' button&lt;br /&gt;
|| Next let us type the value for the '''variable''' in the '''Variable''' '''value''' field.&lt;br /&gt;
&lt;br /&gt;
We can do so by directly typing the '''path''' or by using the '''Browse Directory''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Browse Directory''' button&lt;br /&gt;
&lt;br /&gt;
Point to '''Browse for Folder'''&lt;br /&gt;
|| I will click on the '''Browse Directory''' button.&lt;br /&gt;
&lt;br /&gt;
Immediately the '''Browse for Folder''' dialog box opens up.&lt;br /&gt;
|- &lt;br /&gt;
|| Browse to folder&lt;br /&gt;
&lt;br /&gt;
'''This PC&amp;gt;&amp;gt; C drive &amp;gt;&amp;gt; Program Files&amp;gt;&amp;gt; Java &amp;gt;&amp;gt; jdk1.8.0_271'''&lt;br /&gt;
|  | Browse to '''This PC,''' '''C drive, Program Files, Java, and jdk1.8.0_271 '''directory.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''OK '''button in '''Browse for Folder '''dialog box&lt;br /&gt;
|  | Then click the '''OK '''button in '''Browse for Folder '''dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to '''Variable value'''&lt;br /&gt;
|  | Observe that '''JDK installation path''' is shown in the '''Variable value.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''OK''' button&lt;br /&gt;
|  | Click the '''OK''' button to save the '''variable'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight '''MAVEN_HOME''' and '''ANT_HOME'''&lt;br /&gt;
&lt;br /&gt;
'''MAVEN_HOME = C:\apache-maven-3.6.3'''&lt;br /&gt;
&lt;br /&gt;
'''ANT_HOME= C:\apache-ant-1.10.9'''&lt;br /&gt;
|| Similarly, create '''MAVEN_HOME''' and '''ANT_HOME variables.'''&lt;br /&gt;
&lt;br /&gt;
To do so, follow the steps used to create the '''JAVA_HOME variable.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Highlight values '''of MAVEN_HOME''' and '''ANT_HOME'''&lt;br /&gt;
|  | Ensure that correct '''installation paths''' are entered for '''Maven '''and '''Ant'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Narration only&lt;br /&gt;
|  | Now, let us '''set''' the '''Path variable''' in the '''System Variables '''section.&lt;br /&gt;
|- &lt;br /&gt;
|  | Select '''Path '''variable -&amp;gt; Click '''Edit''' button in '''System variable'''&lt;br /&gt;
|  | Select the '''Path variable''' in the '''System Variables '''section and click the '''Edit''' button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''New''' button in '''Edit Environment Variable''' dialog box&lt;br /&gt;
|  | In the '''Edit Environment Variable''' dialog box, click on the '''New''' button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to text field&lt;br /&gt;
|  | A text field appears to '''set''' the '''path'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Enter '''C:\Program Files\Java\jdk1.8.0_271\bin'''&lt;br /&gt;
|  | Type the '''path''' of the '''JDK''' '''bin''' folder as shown. &lt;br /&gt;
|- &lt;br /&gt;
|  | Press '''Enter''' button&lt;br /&gt;
|  | Press the '''Enter''' button to save the '''variable'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight '''Maven''' and '''Ant''' path&lt;br /&gt;
&lt;br /&gt;
'''Maven '''path = '''C:\apache-maven-3.6.3\bin'''&lt;br /&gt;
&lt;br /&gt;
'''Ant '''path = '''C:\apache-ant-1.10.9\bin'''&lt;br /&gt;
|  | Similarly, '''set paths''' for '''Maven''' and '''Ant'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''OK''' button&lt;br /&gt;
|  | Click the '''OK''' button to save the '''Path variable'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''OK''' button in '''Environment Variable''' dialog box&lt;br /&gt;
|  | Now click the '''OK''' button in the '''Environment Variable''' dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''OK''' button in '''System Properties''' window&lt;br /&gt;
|  | Then click the '''OK''' button in the '''System Properties''' window.&lt;br /&gt;
|- &lt;br /&gt;
|  | Close '''System''' window&lt;br /&gt;
|  | Close the '''System''' window.&lt;br /&gt;
|- &lt;br /&gt;
|  | Narration Only&lt;br /&gt;
|  | Now let us cross-verify the '''path variables''' set for '''JDK, Ant''' and '''Maven.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Type '''cmd''' in search box of '''taskbar'''&lt;br /&gt;
|| Go to the '''search bar''' located at the bottom left of the '''taskbar.'''&lt;br /&gt;
&lt;br /&gt;
Then type''' cmd.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Click on '''Command Prompt'''&lt;br /&gt;
|  | Click on the '''Command Prompt '''application.&lt;br /&gt;
|- &lt;br /&gt;
|  | Only Narration&lt;br /&gt;
|  | Here onwards please remember to press the '''Enter '''key after typing each '''command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
&lt;br /&gt;
'''java -version'''&lt;br /&gt;
|| In the '''prompt''', type the '''command'''&lt;br /&gt;
&lt;br /&gt;
'''java –version'''&lt;br /&gt;
&lt;br /&gt;
This will display the version of '''JDK '''which is '''installed''' on our machine.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
&lt;br /&gt;
'''ant -version'''&lt;br /&gt;
|| Then, Type the '''command''' &lt;br /&gt;
&lt;br /&gt;
'''ant –version'''&lt;br /&gt;
&lt;br /&gt;
This will display the version of '''Ant '''which is '''installed''' on our machine.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
&lt;br /&gt;
'''mvn -version'''&lt;br /&gt;
|| Type the '''command''' &lt;br /&gt;
&lt;br /&gt;
'''mvn –version'''&lt;br /&gt;
&lt;br /&gt;
This will display the version of '''Maven '''which is '''installed''' on our machine.&lt;br /&gt;
|- &lt;br /&gt;
|  | Only Narration&lt;br /&gt;
|  | So, we have '''installed''' and '''set '''the '''Environment Variables''' for '''Java, Ant''' and '''Maven.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Slide : Troubleshoot path variable&lt;br /&gt;
|| If '''JDK''', '''Maven '''and '''Ant '''versions are not shown then recheck the following:&lt;br /&gt;
* Location of the '''Installation''' folders and&lt;br /&gt;
* '''Path variables set''' in '''Environment Variables'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  | Only narration&lt;br /&gt;
|  | Next, let us '''install''' the '''git version control system'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Switchback to browser&lt;br /&gt;
|  | Switch back to the  '''browser.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [Browser] Type:&lt;br /&gt;
&lt;br /&gt;
'''https://git-scm.com/downloads'''&lt;br /&gt;
|  | In the '''address bar''' type the '''URL''' as shown to view available '''git downloads'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click on '''Windows''' under '''Downloads''' section&lt;br /&gt;
|  | Under the '''Downloads''' section, click on '''Windows.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Save file'''&lt;br /&gt;
|| When prompted, click on the '''Save file''' button to download the '''installer'''.&lt;br /&gt;
&lt;br /&gt;
The download of '''Git installer''' begins.&lt;br /&gt;
|- &lt;br /&gt;
|  | Open '''Downloads''' folder&lt;br /&gt;
|  | Now, Go to the '''Downloads''' folder.&lt;br /&gt;
|- &lt;br /&gt;
|  | Double click on '''Git-2.29.2.2-64-bit.exe'''&lt;br /&gt;
|  | Double-click on '''Git-2.29.2.2-64-bit.exe '''to begin the '''installation'''.''' '''&lt;br /&gt;
|- &lt;br /&gt;
|  | Click on '''Yes'''&lt;br /&gt;
|| In the '''User Account Control''' dialog box, click on '''Yes '''or''' Run '''button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''Next''' button&lt;br /&gt;
|  | In the '''Git Setup''' dialog box, click the '''Next''' button continuously 4 times.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
Point to the drop down&lt;br /&gt;
|| The '''setup '''dialog box asks you to choose the default '''editor''' used by '''Git.'''&lt;br /&gt;
&lt;br /&gt;
In the drop-down, make sure that “'''Use Vim as Git’s default Editor'''” is selected by default.&lt;br /&gt;
&lt;br /&gt;
If not, select the same.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''Next''' button repeatedly&lt;br /&gt;
|  | Then click on the '''Next''' button continuously to '''install''' with the default '''configuration'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''Install''' button&lt;br /&gt;
|  | Lastly, click on the '''Install '''button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Uncheck Checkbox of View release notes&lt;br /&gt;
|  | Once the '''installation''' is over, uncheck the checkbox of “'''View release notes'''”.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click the '''Next '''button&lt;br /&gt;
|  | Then click on the '''Next '''or''' Finish '''button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Only narration&lt;br /&gt;
|  | So now, '''git''' is '''installed''' on the system.&lt;br /&gt;
|- &lt;br /&gt;
|  | Restart the System&lt;br /&gt;
|  | Restart the system to bring all the '''configurations''' into effect.&lt;br /&gt;
|- &lt;br /&gt;
|  | Only narration&lt;br /&gt;
|| With this we have '''installed''' and '''configured '''the required '''packages''' for '''DSpace installation'''.&lt;br /&gt;
&lt;br /&gt;
Let us summarize.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Summary&lt;br /&gt;
|| In this tutorial, we learnt to-&lt;br /&gt;
* '''Install Java, Ant, Maven '''and''' git '''and&lt;br /&gt;
* '''Set''' '''Environment Variables''' for '''Java, Ant, '''and''' Maven'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : About Spoken Tutorial project&lt;br /&gt;
|| The video at the following link summarises the '''Spoken Tutorial project.'''&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Spoken Tutorial workshops&lt;br /&gt;
&lt;br /&gt;
|| The '''Spoken Tutorial Project''' team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Answers for THIS Spoken Tutorial&lt;br /&gt;
|| &lt;br /&gt;
* Do you have questions in THIS Spoken Tutorial? Please visit this site.&lt;br /&gt;
* Choose the minute and second where you have the question.&lt;br /&gt;
* Explain your question briefly.&lt;br /&gt;
* The Spoken Tutorial project will ensure an answer.&lt;br /&gt;
* You will have to register to ask questions.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Forum for specific questions&lt;br /&gt;
|| &lt;br /&gt;
* The Spoken Tutorial forum is for specific questions on this tutorial.&lt;br /&gt;
* Please do not post unrelated and general questions on them.&lt;br /&gt;
* This will help reduce the clutter.&lt;br /&gt;
* With less clutter, we can use these discussions as instructional material.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Acknowledgement -I&lt;br /&gt;
|| '''Spoken Tutorial project''' is funded by Ministry of Education (MoE), Government of India.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Acknowledgement -II&lt;br /&gt;
&lt;br /&gt;
|| '''DSpace spoken tutorial''' series is funded by the National Virtual Library of India, Ministry of Culture, Government of India.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
&lt;br /&gt;
|| This script and video for this tutorial was contributed by '''Pankaj Patil''' from''' IIT Bombay.'''&lt;br /&gt;
&lt;br /&gt;
And this is '''Nancy Varkey '''signing off. Thanks for joining.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/DSpace/C2/Installation-of-JDK-and-Build-tool-on-Windows-OS/English</id>
		<title>DSpace/C2/Installation-of-JDK-and-Build-tool-on-Windows-OS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/DSpace/C2/Installation-of-JDK-and-Build-tool-on-Windows-OS/English"/>
				<updated>2021-01-13T15:20:12Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Script: Install JDK and Build tools on Windows 10'''&lt;br /&gt;
&lt;br /&gt;
'''Author : Pankaj Patil'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: DSpace installation on Windows, Install JDK, install Java, install Maven, install Ant, install git, Set Environment variables, Set Path variables'''&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
|- &lt;br /&gt;
| align=center| '''Visual Cue'''&lt;br /&gt;
| align=center| '''Narration'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Title&lt;br /&gt;
|| Welcome to this spoken tutorial on '''Install JDK and Build tools on Windows 10.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Learning Objectives Slide&lt;br /&gt;
|| In this tutorial, we will learn to &lt;br /&gt;
* '''Install Java, Ant, Maven '''and''' git '''and&lt;br /&gt;
* '''Set Environment variables''' for '''Java, Ant, '''and''' Maven'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: System requirements&lt;br /&gt;
|| This tutorial is recorded using&lt;br /&gt;
* '''Windows 10 64 bit OS'''&lt;br /&gt;
* '''WordPad '''and&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''editor''' or '''web''' '''browser''' of your choice.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
|| To practice this tutorial, &lt;br /&gt;
* You should have an '''internet''' connection to '''install''' the necessary '''packages '''&lt;br /&gt;
* You should also have '''installed 7Zip file archiver'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Pre-requisites&lt;br /&gt;
&lt;br /&gt;
'''https://www.7-zip.org'''&lt;br /&gt;
|| &lt;br /&gt;
* If not, then download and '''install''' it using this '''URL'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Hardware requirements&lt;br /&gt;
|| The minimum hardware requirements for '''DSpace installation''' are&lt;br /&gt;
* '''i3 processor''' or above&lt;br /&gt;
* '''100GB hard disk''' or more&lt;br /&gt;
* '''4GB RAM''' or above &lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Code files&lt;br /&gt;
|| &lt;br /&gt;
* The '''commands''' used in this tutorial are in a file in the '''Code Files '''link on this tutorial page.&lt;br /&gt;
* Please download and extract the file before practicing.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Switch to '''WordPad '''and open the file&lt;br /&gt;
|| I have opened the '''commands file''' in '''WordPad editor '''on my machine.&lt;br /&gt;
&lt;br /&gt;
And I will use the same file to copy-paste the '''commands''' during the demonstration.&lt;br /&gt;
&lt;br /&gt;
The shortcut to paste on the '''Command Prompt '''is''' Ctrl '''and '''V '''keys'''.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| To install '''DSpace''', it is mandatory to have basic '''packages''' like '''Java, Ant, Maven '''and''' git.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| Now, let us begin by '''installing''' the '''Java Development Kit.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Open web browser&lt;br /&gt;
|  | Open a '''web browser'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Browser] Type:&lt;br /&gt;
&lt;br /&gt;
'''https://www.oracle.com/in/java/technologies/javase/javase-jdk8-downloads.html'''&lt;br /&gt;
|  | In the '''address bar''', type the '''URL '''as shown to view '''JDK8 installers''' available from '''Oracle'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Locate and highlight&lt;br /&gt;
&lt;br /&gt;
'''jdk-8u271-windows-x64.exe'''&lt;br /&gt;
|| Locate the '''installer file''' for '''Windows 64''' bit.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  | Highlight '''u271'''&lt;br /&gt;
|  | '''u271''' in the '''installation file''' name, is the '''release number''', which may be different in your case.&lt;br /&gt;
|- &lt;br /&gt;
|  | Highlight '''x64'''&lt;br /&gt;
|  | '''x64''' in the '''installation file''' name, indicates '''64-bit operating system'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Installer for '''32 bit Windows OS'''&lt;br /&gt;
|| If you are using a '''32-bit operating system''', then you should download the '''installer''' for '''32-bit OS'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Switch back to browser&lt;br /&gt;
|| Switch back to the '''browser.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Click on the link '''jdk-8u271-windows-x64.exe'''&lt;br /&gt;
|| My machine is a '''64-bit OS'''. &lt;br /&gt;
&lt;br /&gt;
So, I will download '''jdk-8u271-windows-x64.exe.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to Pop-up window&lt;br /&gt;
|| A pop-up window opens up to accept the '''license agreement'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Check the checkbox of license agreement&lt;br /&gt;
&lt;br /&gt;
Click on the button''' Download jdk-8u271-windows-x64.exe'''&lt;br /&gt;
|| Check the checkbox of the '''license agreement'''.&lt;br /&gt;
&lt;br /&gt;
And click on the button''' Download jdk-8u271-windows-x64.exe'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to''' Oracle '''sign in&lt;br /&gt;
|  | We will be redirected to the '''Oracle login page.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Only Narration&lt;br /&gt;
|| If you do not have an '''Oracle account''', please create an account and then log into '''Oracle.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Enter Username : '''dspace.u1@gmail.com'''&lt;br /&gt;
&lt;br /&gt;
Password:''' **********'''&lt;br /&gt;
|| I will enter the '''username''' and '''password''' of my '''Oracle account'''.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Save file'''&lt;br /&gt;
|| If prompted, click on the '''Save file''' button to download the '''installer'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to downloading of '''jdk-8u271-windows-x64.exe'''&lt;br /&gt;
|| The '''installation file''' will get downloaded in the default '''downloads directory'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Open '''Downloads''' folder&lt;br /&gt;
|| Go to the place where you have downloaded the file on your machine.&lt;br /&gt;
&lt;br /&gt;
In my case it is in the '''Downloads folder.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Double click on '''jdk-8u271-windows-x64.exe'''&lt;br /&gt;
|| Double-click on the '''jdk-8u271-windows-x64.exe,''' to begin the '''installation'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click on '''Yes'''&lt;br /&gt;
|| In the '''User Account Control''' dialog box, click on the '''Yes '''or''' Run '''button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''Next '''button&lt;br /&gt;
|  | In the '''Setup''' dialog box, click the '''Next''' button to continue the installation process.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Development Tools'''&lt;br /&gt;
&lt;br /&gt;
Click '''Next''' button&lt;br /&gt;
|| In the '''Custom Setup''' page, ensure that''' Development Tools '''is selected for '''installation. '''&lt;br /&gt;
&lt;br /&gt;
Click the '''Next '''button to continue.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to I'''nstall to:'''&lt;br /&gt;
|| Another dialog box opens up to select the '''installation folder'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Point to''' C:\Program Files\Java\jre1.8.0_271'''&lt;br /&gt;
|| The installation path is set to '''C:\Program Files\Java\jre1.8.0_271.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Change''' button&lt;br /&gt;
|| If you wish to change the '''path''', click on the '''Change''' button.&lt;br /&gt;
&lt;br /&gt;
I don’t wish to change the '''path''', so I will not be clicking.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''Next''' button&lt;br /&gt;
|| Click on the '''Next '''button to continue.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| '''JDK '''installation has begun. &lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
|| '''Installation''' is successfully completed now.&lt;br /&gt;
|- &lt;br /&gt;
|| Click '''Close''' button&lt;br /&gt;
|| Click on the '''Close''' button to close the dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|  | Only Narration&lt;br /&gt;
|| Now, let us install '''Apache Maven''', which is used to '''build DSpace source code'''. &lt;br /&gt;
|- &lt;br /&gt;
|  | Switch back to browser&lt;br /&gt;
|| Switch back to the '''browser'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Browser] Type:&lt;br /&gt;
'''https://downloads.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.zip'''&lt;br /&gt;
|| In the '''address bar''' type the '''URL''' as shown.&lt;br /&gt;
This will download '''Apache Maven 3.6.3'''&lt;br /&gt;
|- &lt;br /&gt;
|| Select “Save File” -&amp;gt; OK&lt;br /&gt;
|| If prompted, click on the '''Save file''' option and then on the '''OK''' button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Switch back to '''Downloads''' folder&lt;br /&gt;
|  | Switch back to the '''Downloads''' folder.&lt;br /&gt;
|- &lt;br /&gt;
|  | Copy '''apache-maven-3.6.3-bin.zip '''file to '''C drive'''&lt;br /&gt;
|  | Copy the file '''apache-maven-3.6.3-bin.zip '''to '''C drive'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click''' Continue'''&lt;br /&gt;
|| If '''prompted, '''click on''' Continue '''to provide '''administrator permissions''' for copying.&lt;br /&gt;
|- &lt;br /&gt;
|| Right click on&lt;br /&gt;
&lt;br /&gt;
'''apache-maven-3.6.3-bin zip '''-&amp;gt;''' 7-Zip'''&lt;br /&gt;
&lt;br /&gt;
Select '''Extract Here'''&lt;br /&gt;
|| Right-click on the file''' apache-maven-3.6.3-bin zip '''&lt;br /&gt;
&lt;br /&gt;
From the context menu, select '''7-Zip'''&lt;br /&gt;
&lt;br /&gt;
Then from the sub-menu, select '''Extract Here.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Narration only&lt;br /&gt;
|  | The file extraction begins.&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to '''apache-maven-3.6.3 '''folder&lt;br /&gt;
|  | The '''zipped''' contents are extracted in the '''apache-maven-3.6.3 '''folder.&lt;br /&gt;
|- &lt;br /&gt;
|  | Double click on the '''apache-maven-3.6.3 '''folder&lt;br /&gt;
|  | Open the folder '''apache-maven-3.6.3 '''by double-clicking on it.&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to path '''C:\apache-maven-3.6.3'''&lt;br /&gt;
|  | The extracted contents '''bin, boot, conf, lib''' are located in the path '''C:\apache-maven-3.6.3.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Only Narration&lt;br /&gt;
|  | In case the contents are extracted to any other folder, move them to this folder.&lt;br /&gt;
|- &lt;br /&gt;
|  | Only Narration&lt;br /&gt;
|  | Next, we will install the '''Apache Ant '''tool,''' '''which''' '''is used to install '''DSpace'''. &lt;br /&gt;
|- &lt;br /&gt;
|| [Browser] Type:&lt;br /&gt;
&lt;br /&gt;
'''https://downloads.apache.org/ant/binaries/apache-ant-1.10.9-bin.zip'''&lt;br /&gt;
|| Switch back to the '''browser'''.&lt;br /&gt;
&lt;br /&gt;
In the '''address bar''' type the '''URL''' as shown to download '''Apache Ant'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Select “Save File” -&amp;gt; OK&lt;br /&gt;
|| If prompted, click on the '''Save file''' option and then on the '''OK''' button&lt;br /&gt;
|- &lt;br /&gt;
|  | Switch back to '''Downloads''' folder&lt;br /&gt;
|  | Switch back to the '''Downloads''' folder.&lt;br /&gt;
|- &lt;br /&gt;
|  | Copy and extract''' apache-ant-1.10.9-bin.zip '''file in C drive&lt;br /&gt;
|  | Like '''Maven''', copy and extract''' '''the file '''apache-ant-1.10.9-bin.zip '''to '''C''' '''drive'''. &lt;br /&gt;
|- &lt;br /&gt;
|  | Point to path '''C:\apache-ant-1.10.9'''&lt;br /&gt;
|  | Extracted contents '''bin, etc, lib, manual''' are located in the path''' C:\apache-ant-1.10.9.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Narration only&lt;br /&gt;
|  | Now let us set '''path variables''' for '''Java, Ant''' and '''Maven'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Go to '''This PC'''&lt;br /&gt;
|| Go to '''My Computer''' or '''This PC.'''&lt;br /&gt;
&lt;br /&gt;
Right-click on the empty area and select '''Properties.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Click on '''Advanced system settings'''&lt;br /&gt;
|  | Then click on the '''Advanced system settings '''from the left panel.&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to the '''Advanced''' tab&lt;br /&gt;
|  | In the '''System Properties''' dialog box, make sure that the '''Advanced''' tab is selected.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''Environment Variables '''button&lt;br /&gt;
|  | In the '''Advanced '''settings, click on the '''Environment Variables '''button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''New '''button&lt;br /&gt;
|  | In the '''Environment Variables '''dialog box, click on the '''New '''button in the '''User variable '''section.&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to '''New User Variable '''dialog box&lt;br /&gt;
|  | '''New User Variable''' dialog box opens up.&lt;br /&gt;
|- &lt;br /&gt;
|  | Narration only&lt;br /&gt;
|  | Let us create a '''user variable''' for '''JDK'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Enter variable name as '''JAVA_HOME'''&lt;br /&gt;
|  | Type the '''variable''' name as '''JAVA_HOME.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Point to '''Variable value''' field&lt;br /&gt;
&lt;br /&gt;
Point to '''Browse Directory''' button&lt;br /&gt;
|| Next let us type the value for the '''variable''' in the '''Variable''' '''value''' field.&lt;br /&gt;
&lt;br /&gt;
We can do so by directly typing the '''path''' or by using the '''Browse Directory''' button.&lt;br /&gt;
|- &lt;br /&gt;
|| Click on '''Browse Directory''' button&lt;br /&gt;
&lt;br /&gt;
Point to '''Browse for Folder'''&lt;br /&gt;
|| I will click on the '''Browse Directory''' button.&lt;br /&gt;
&lt;br /&gt;
Immediately the '''Browse for Folder''' dialog box opens up.&lt;br /&gt;
|- &lt;br /&gt;
|| Browse to folder&lt;br /&gt;
&lt;br /&gt;
'''This PC&amp;gt;&amp;gt; C drive &amp;gt;&amp;gt; Program Files&amp;gt;&amp;gt; Java &amp;gt;&amp;gt; jdk1.8.0_271'''&lt;br /&gt;
|  | Browse to '''This PC,''' '''C drive, Program Files, Java, jdk1.8.0_271 '''directory.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''OK '''button in '''Browse for Folder '''dialog box&lt;br /&gt;
|  | Then click the '''OK '''button in '''Browse for Folder '''dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to '''Variable value'''&lt;br /&gt;
|  | Observe that '''JDK installation path''' is shown in the '''Variable value.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''OK''' button&lt;br /&gt;
|  | Click the '''OK''' button to save the '''variable'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight '''MAVEN_HOME''' and '''ANT_HOME'''&lt;br /&gt;
&lt;br /&gt;
'''MAVEN_HOME = C:\apache-maven-3.6.3'''&lt;br /&gt;
&lt;br /&gt;
'''ANT_HOME= C:\apache-ant-1.10.9'''&lt;br /&gt;
|| Similarly, create '''MAVEN_HOME''' and '''ANT_HOME variables.'''&lt;br /&gt;
&lt;br /&gt;
To do so, follow the steps used to create the '''JAVA_HOME variable.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Highlight values '''of MAVEN_HOME''' and '''ANT_HOME'''&lt;br /&gt;
|  | Ensure that correct '''installation paths''' are entered for '''Maven '''and '''Ant'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Narration only&lt;br /&gt;
|  | Now, let us '''set''' the '''Path variable''' in the '''System Variables '''section.&lt;br /&gt;
|- &lt;br /&gt;
|  | Select '''Path '''variable -&amp;gt; Click '''Edit''' button in '''System variable'''&lt;br /&gt;
|  | Select the '''Path variable''' in the '''System Variables '''section and click the '''Edit''' button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''New''' button in '''Edit Environment Variable''' dialog box&lt;br /&gt;
|  | In the '''Edit Environment Variable''' dialog box, click on the '''New''' button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Point to text field&lt;br /&gt;
|  | A text field appears to '''set''' the '''path'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Enter '''C:\Program Files\Java\jdk1.8.0_271\bin'''&lt;br /&gt;
|  | Type the '''path''' of the '''JDK''' '''bin''' folder as shown. &lt;br /&gt;
|- &lt;br /&gt;
|  | Press '''Enter''' button&lt;br /&gt;
|  | Press the '''Enter''' button to save the '''variable'''.&lt;br /&gt;
|- &lt;br /&gt;
|| Highlight '''Maven''' and '''Ant''' path&lt;br /&gt;
&lt;br /&gt;
'''Maven '''path = '''C:\apache-maven-3.6.3\bin'''&lt;br /&gt;
&lt;br /&gt;
'''Ant '''path = '''C:\apache-ant-1.10.9\bin'''&lt;br /&gt;
|  | Similarly, '''set paths''' for '''Maven''' and '''Ant'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''OK''' button&lt;br /&gt;
|  | Click the '''OK''' button to save the '''Path variable'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''OK''' button in '''Environment Variable''' dialog box&lt;br /&gt;
|  | Now click the '''OK''' button in the '''Environment Variable''' dialog box.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''OK''' button in '''System Properties''' window&lt;br /&gt;
|  | Then click the '''OK''' button in the '''System Properties''' window.&lt;br /&gt;
|- &lt;br /&gt;
|  | Close '''System''' window&lt;br /&gt;
|  | Close the '''System''' window.&lt;br /&gt;
|- &lt;br /&gt;
|  | Narration Only&lt;br /&gt;
|  | Now let us cross-verify the '''path variables''' set for '''JDK, Ant''' and '''Maven.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Type '''cmd''' in search box of '''taskbar'''&lt;br /&gt;
|| Go to the '''search bar''' located at the bottom left of the '''taskbar.'''&lt;br /&gt;
&lt;br /&gt;
Then type''' cmd.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Click on '''Command Prompt'''&lt;br /&gt;
|  | Click on the '''Command Prompt '''application.&lt;br /&gt;
|- &lt;br /&gt;
|  | Only Narration&lt;br /&gt;
|  | Here onwards please remember to press the '''Enter '''key after typing each '''command'''.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
&lt;br /&gt;
'''java -version'''&lt;br /&gt;
|| In the '''prompt''', type the '''command'''&lt;br /&gt;
&lt;br /&gt;
'''java –version'''&lt;br /&gt;
&lt;br /&gt;
This will display the version of '''JDK '''which is '''installed''' on our machine.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
&lt;br /&gt;
'''ant -version'''&lt;br /&gt;
|| Then, Type the '''command''' &lt;br /&gt;
&lt;br /&gt;
'''ant –version'''&lt;br /&gt;
&lt;br /&gt;
This will display the version of '''Ant '''which is '''installed''' on our machine.&lt;br /&gt;
|- &lt;br /&gt;
|| [Command Prompt] Type:&lt;br /&gt;
&lt;br /&gt;
'''mvn -version'''&lt;br /&gt;
|| Type the '''command''' &lt;br /&gt;
&lt;br /&gt;
'''mvn –version'''&lt;br /&gt;
&lt;br /&gt;
This will display the version of '''Maven '''which is '''installed''' on our machine.&lt;br /&gt;
|- &lt;br /&gt;
|  | Only Narration&lt;br /&gt;
|  | So, we have '''installed''' and '''set '''the '''Environment Variables''' for '''Java, Ant''' and '''Maven.'''&lt;br /&gt;
|- &lt;br /&gt;
|  | Slide : Troubleshoot path variable&lt;br /&gt;
|| If '''JDK''', '''Maven '''and '''Ant '''versions are not shown then recheck the following:&lt;br /&gt;
* Location of the '''Installation''' folders and&lt;br /&gt;
* '''Path variables set''' in '''Environment Variables'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|  | Only narration&lt;br /&gt;
|  | Next, let us '''install''' the '''git version control system'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Switchback to browser&lt;br /&gt;
|  | Switch back to '''browser.'''&lt;br /&gt;
|- &lt;br /&gt;
|| [Browser] Type:&lt;br /&gt;
&lt;br /&gt;
'''https://git-scm.com/downloads'''&lt;br /&gt;
|  | In the '''address bar''' type the '''URL''' as shown to view available '''git downloads'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click on '''Windows''' under '''Downloads''' section&lt;br /&gt;
|  | Under the '''Downloads''' section, click on '''Windows.'''&lt;br /&gt;
|- &lt;br /&gt;
|| Click on the '''Save file'''&lt;br /&gt;
|| When prompted, click on the '''Save file''' button to download the '''installer'''.&lt;br /&gt;
&lt;br /&gt;
The download of '''Git installer''' begins.&lt;br /&gt;
|- &lt;br /&gt;
|  | Open '''Downloads''' folder&lt;br /&gt;
|  | Now, Go to the '''Downloads''' folder.&lt;br /&gt;
|- &lt;br /&gt;
|  | Double click on '''Git-2.29.2.2-64-bit.exe'''&lt;br /&gt;
|  | Double-click on '''Git-2.29.2.2-64-bit.exe '''to begin the '''installation'''.''' '''&lt;br /&gt;
|- &lt;br /&gt;
|  | Click on '''Yes'''&lt;br /&gt;
|| In the '''User Account Control''' dialog box, click on '''Yes '''or''' Run '''button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''Next''' button&lt;br /&gt;
|  | In the '''Git Setup''' dialog box, click the '''Next''' button continuously 4 times.&lt;br /&gt;
|- &lt;br /&gt;
|| &lt;br /&gt;
&lt;br /&gt;
Point to the drop down&lt;br /&gt;
|| The '''setup '''dialog box asks you to choose the default '''editor''' used by '''Git.'''&lt;br /&gt;
&lt;br /&gt;
In the drop-down, make sure that “'''Use Vim as Git’s default Editor'''” is selected by default.&lt;br /&gt;
&lt;br /&gt;
If not, select the same.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''Next''' button repeatedly&lt;br /&gt;
|  | Then click on the '''Next''' button continuously to '''install''' with the default '''configuration'''.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click '''Install''' button&lt;br /&gt;
|  | Lastly, click on the '''Install '''button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Uncheck Checkbox of View release notes&lt;br /&gt;
|  | Once the '''installation''' is over, uncheck the checkbox of “'''View release notes'''”.&lt;br /&gt;
|- &lt;br /&gt;
|  | Click the '''Next '''button&lt;br /&gt;
|  | Then click on the '''Next '''or''' Finish '''button.&lt;br /&gt;
|- &lt;br /&gt;
|  | Only narration&lt;br /&gt;
|  | So now, '''git''' is '''installed''' on the system.&lt;br /&gt;
|- &lt;br /&gt;
|  | Restart the System&lt;br /&gt;
|  | Restart the system to bring all the '''configurations''' into effect.&lt;br /&gt;
|- &lt;br /&gt;
|  | Only narration&lt;br /&gt;
|| With this we have '''installed''' and '''configured '''the required '''packages''' for '''DSpace installation'''.&lt;br /&gt;
&lt;br /&gt;
Let us summarize.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Summary&lt;br /&gt;
|| In this tutorial, we learnt to-&lt;br /&gt;
* '''Install Java, Ant, Maven '''and''' git '''and&lt;br /&gt;
* '''Set''' '''Environment Variables''' for '''Java, Ant, '''and''' Maven'''&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : About Spoken Tutorial project&lt;br /&gt;
|| The video at the following link summarises the '''Spoken Tutorial project.'''&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Spoken Tutorial workshops&lt;br /&gt;
&lt;br /&gt;
|| The '''Spoken Tutorial Project''' team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Answers for THIS Spoken Tutorial&lt;br /&gt;
|| &lt;br /&gt;
* Do you have questions in THIS Spoken Tutorial? Please visit this site.&lt;br /&gt;
* Choose the minute and second where you have the question.&lt;br /&gt;
* Explain your question briefly.&lt;br /&gt;
* The Spoken Tutorial project will ensure an answer.&lt;br /&gt;
* You will have to register to ask questions.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide : Forum for specific questions&lt;br /&gt;
|| &lt;br /&gt;
* The Spoken Tutorial forum is for specific questions on this tutorial.&lt;br /&gt;
* Please do not post unrelated and general questions on them.&lt;br /&gt;
* This will help reduce the clutter.&lt;br /&gt;
* With less clutter, we can use these discussions as instructional material.&lt;br /&gt;
&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Acknowledgement -I&lt;br /&gt;
|| '''Spoken Tutorial project''' is funded by Ministry of Education (MoE), Government of India.&lt;br /&gt;
|- &lt;br /&gt;
|| Slide: Acknowledgement -II&lt;br /&gt;
&lt;br /&gt;
|| '''DSpace spoken tutorial''' series is funded by the National Virtual Library of India, Ministry of Culture, Government of India.&lt;br /&gt;
|- &lt;br /&gt;
|| Narration only&lt;br /&gt;
&lt;br /&gt;
|| This script and video for this tutorial was contributed by '''Pankaj Patil''' from''' IIT Bombay.'''&lt;br /&gt;
&lt;br /&gt;
And this is '''Nancy Varkey '''signing off. Thanks for joining.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/CSS/C3/Forms-in-CSS/English</id>
		<title>CSS/C3/Forms-in-CSS/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/CSS/C3/Forms-in-CSS/English"/>
				<updated>2020-11-13T17:32:22Z</updated>
		
		<summary type="html">&lt;p&gt;Pravin1389: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script: '''Forms in CSS&lt;br /&gt;
&lt;br /&gt;
'''Author:''' Neha Solanki&lt;br /&gt;
&lt;br /&gt;
'''Domain Reviewer: '''Ankita Maske, Om Prakash Soni&lt;br /&gt;
&lt;br /&gt;
'''Novice Reviewer:''' Madhuri Ganapathi&lt;br /&gt;
&lt;br /&gt;
'''Keywords: '''CSS, HTML, Web Page, Web Design, Web Technology, Video Tutorial, Spoken Tutorial, CSS Forms, CSS Forms Border, CSS Forms Width, CSS Forms Padding, CSS Forms Color, CSS Forms Focus, CSS Forms Image, CSS Forms Animation, CSS Forms Label, Media rule, CSS Forms Select Menu, CSS Forms Textarea, CSS Forms Input Buttons, CSS Responsive Form&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|  | '''Visual Cue'''&lt;br /&gt;
|  | '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Title&lt;br /&gt;
|  | Welcome to the spoken tutorial on “'''Forms in CSS'''” &lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Learning Objectives&lt;br /&gt;
|  | In this tutorial we will learn about:&lt;br /&gt;
&lt;br /&gt;
* Styling '''Forms '''in''' CSS '''and&lt;br /&gt;
* Customise the '''input fields''' as per our requirements&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: &lt;br /&gt;
&lt;br /&gt;
System Requirements&lt;br /&gt;
&lt;br /&gt;
|  | This tutorial is recorded using, &lt;br /&gt;
&lt;br /&gt;
* '''Ubuntu Linux OS v 18.04 '''&lt;br /&gt;
* '''CSS3'''&lt;br /&gt;
* '''HTML5'''&lt;br /&gt;
* '''gedit Text Editor '''and&lt;br /&gt;
* '''Firefox web browser'''&lt;br /&gt;
&lt;br /&gt;
However you may use any other '''editor''' or '''browser''' of your choice.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Prerequisite &lt;br /&gt;
&lt;br /&gt;
https://spoken-tutorial.org&lt;br /&gt;
|  | To practise this tutorial, you should know to use '''HTML''' and '''CSS'''.&lt;br /&gt;
&lt;br /&gt;
If not, please go through the '''HTML''' and '''CSS '''tutorials on this website.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Code Files&lt;br /&gt;
|  | The files used in this tutorial are available in the '''Code Files''' link on this tutorial page.&lt;br /&gt;
&lt;br /&gt;
Please download and extract them.&lt;br /&gt;
&lt;br /&gt;
Make a copy and then use them while practising.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Forms&lt;br /&gt;
|  | &lt;br /&gt;
* Using '''CSS''' we can style and format '''forms '''as per our requirements.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Forms&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;width: 22em;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| '''Border''' || '''Width'''&lt;br /&gt;
|-&lt;br /&gt;
| '''Padding || '''Color'''&lt;br /&gt;
|-&lt;br /&gt;
| '''Focus''' || '''Image'''&lt;br /&gt;
|-&lt;br /&gt;
|'''Animation'''&lt;br /&gt;
|}&lt;br /&gt;
|  | These are some '''CSS '''properties used for '''forms''':&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Forms&lt;br /&gt;
|  | We will learn how to design:&lt;br /&gt;
&lt;br /&gt;
* '''Input text'''&lt;br /&gt;
* '''Label'''&lt;br /&gt;
* '''Select Menu'''&lt;br /&gt;
* '''Textarea'''&lt;br /&gt;
* '''Input Buttons'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Forms&lt;br /&gt;
|  | We will also learn how to create a '''Responsive Form.'''&lt;br /&gt;
&lt;br /&gt;
Let us understand these one by one.&lt;br /&gt;
|-&lt;br /&gt;
|  | Open '''my-css '''folder&lt;br /&gt;
|  | Go to the practice folder '''my-css.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Narration&lt;br /&gt;
|  | For this demonstration I have created a '''Registration form '''and saved it as '''MyWebForm.html'''&lt;br /&gt;
&lt;br /&gt;
The same is available in the '''Code files '''link.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - MyWebForm.html]&lt;br /&gt;
|  | Open the file '''MyWebForm.html '''in any '''text editor.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - MyWebForm.html] Highlight:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;form&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;label for=&amp;quot;fname&amp;quot;&amp;gt; First Name &amp;lt;/label&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;fname&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Submit&amp;quot;&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; href=&amp;quot;Style.css&amp;quot;&amp;gt;&lt;br /&gt;
|  | Here I have created a simple '''form''' to fetch '''First Name''' from the '''user'''.&lt;br /&gt;
&lt;br /&gt;
And linked this file to '''style'''.'''css''' stylesheet.&lt;br /&gt;
|-&lt;br /&gt;
|  | Open MyWebForm.html in firefox&lt;br /&gt;
|  | Switch to the '''my-css''' folder.&lt;br /&gt;
&lt;br /&gt;
Now open the file '''MyWebForm.html''' in a '''web browser'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] Highlight the output&lt;br /&gt;
|  | Observe the output.&lt;br /&gt;
&lt;br /&gt;
It displays an '''input textbox''' to get the '''First name''' from the '''user'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Narration &lt;br /&gt;
|  | Let us apply '''CSS '''properties to this '''form'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Border&lt;br /&gt;
&lt;br /&gt;
|  | &lt;br /&gt;
* '''Border '''property is used to set the size, type and color for the '''borders'''.&lt;br /&gt;
* '''Border-radius''' property is used to make the corners round.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Open Style.css in gedit&lt;br /&gt;
|  | Switch to the '''my-css''' folder.&lt;br /&gt;
&lt;br /&gt;
Open the file '''Style.css''' in any '''text editor'''.&lt;br /&gt;
&lt;br /&gt;
I have opened it in the '''gedit text editor'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - Style.css] Type:&lt;br /&gt;
&lt;br /&gt;
input[type=text]{&lt;br /&gt;
&lt;br /&gt;
border: 3px solid purple;&lt;br /&gt;
&lt;br /&gt;
border-radius: 10px;}&lt;br /&gt;
|  | &lt;br /&gt;
&lt;br /&gt;
Now type the code as shown.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - Style.css] &lt;br /&gt;
&lt;br /&gt;
Highlight:&lt;br /&gt;
&lt;br /&gt;
input[type=text]&lt;br /&gt;
|  | The way to define the '''CSS''' property for a '''form''' is different from other '''elements'''.&lt;br /&gt;
&lt;br /&gt;
Here I have written the name of the '''form element''' first.&lt;br /&gt;
&lt;br /&gt;
Then within the square bracket I have mentioned the '''type''' of the '''element'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - Style.css] Highlight:&lt;br /&gt;
&lt;br /&gt;
border: 3px solid purple;&lt;br /&gt;
&lt;br /&gt;
border-radius: 10px;&lt;br /&gt;
|  | I have set the '''border''' '''size''' to '''3 pixels''', '''border''' '''type''' to '''solid''' and '''border color '''to''' purple.'''&lt;br /&gt;
&lt;br /&gt;
To increase the size of roundness I have set the '''radius''' to '''10 pixels'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Press Ctrl + S&lt;br /&gt;
|  | Save the file.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to firefox&lt;br /&gt;
|  | Switch to the '''browser''' and refresh the page&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] Highlight the output&lt;br /&gt;
|  | Observe the output.&lt;br /&gt;
&lt;br /&gt;
The border is set now.&lt;br /&gt;
|-&lt;br /&gt;
|  | Only narration&lt;br /&gt;
|  | Next, using '''CSS width '''property we can set '''width''' of the '''form elements.'''&lt;br /&gt;
&lt;br /&gt;
Let us try this.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to Style.css&lt;br /&gt;
|  | Switch to the '''Style.css''' file.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - Style.css] Type:&lt;br /&gt;
&lt;br /&gt;
width: 60%;&lt;br /&gt;
|  | I will set the '''width '''of the '''input field '''to''' 60% '''of the '''web page'''.&lt;br /&gt;
&lt;br /&gt;
Inside the''' input text tag''', next to '''border-radius''' property, type the code as shown.&lt;br /&gt;
|-&lt;br /&gt;
|  | Press Ctrl + S&lt;br /&gt;
|  | Save the file.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to firefox&lt;br /&gt;
|  | Switch to the '''browser''' and refresh the page.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] Highlight the output&lt;br /&gt;
|  | Observe the output.&lt;br /&gt;
&lt;br /&gt;
Width is set to 60% of the width of '''web''' '''page''' &lt;br /&gt;
|-&lt;br /&gt;
|  | Only narration&lt;br /&gt;
|  | Next, using''' Padding '''property we can add some space around the '''text'''.&lt;br /&gt;
&lt;br /&gt;
Let us try this.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to Style.css&lt;br /&gt;
|  | Switch to the '''Style.css''' file.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - Style.css] Type:&lt;br /&gt;
&lt;br /&gt;
padding: 10px;&lt;br /&gt;
|  | I will set the '''padding '''to''' 10 pixels.'''&lt;br /&gt;
&lt;br /&gt;
Inside the''' input text tag''', next to '''width''' property, type the code as shown.&lt;br /&gt;
|-&lt;br /&gt;
|  | Press Ctrl + S&lt;br /&gt;
|  | Save the file.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to firefox&lt;br /&gt;
|  | Switch to the '''browser''' and refresh the page.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] &lt;br /&gt;
&lt;br /&gt;
Highlight the output&lt;br /&gt;
|  | Observe the output.&lt;br /&gt;
&lt;br /&gt;
Size of the '''input field''' has increased because we have set the '''padding''' space to '''10 pixels.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Only narration&lt;br /&gt;
|  | Using '''CSS color '''property we can set colors to the forms, as well.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to Style.css&lt;br /&gt;
|  | Switch to the '''Style.css''' file.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - Style.css] Type:&lt;br /&gt;
&lt;br /&gt;
background-color: lightcyan;&lt;br /&gt;
&lt;br /&gt;
color: blue;&lt;br /&gt;
|  | I will set the '''background color '''to''' light cyan '''and the '''color '''of the text to''' blue.'''&lt;br /&gt;
&lt;br /&gt;
Inside the''' input text tag''', next to '''padding''' property, type the code as shown.&lt;br /&gt;
|-&lt;br /&gt;
|  | Press Ctrl + S&lt;br /&gt;
|  | Save the file.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to firefox&lt;br /&gt;
|  | Switch to the '''browser''' and refresh the page.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] &lt;br /&gt;
&lt;br /&gt;
Highlight the output&lt;br /&gt;
|  | Observe the output.&lt;br /&gt;
&lt;br /&gt;
'''Background color''' is set''' '''to''' light cyan.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] Type: Spoken&lt;br /&gt;
|  | Now type some text in the''' input field '''for testing purposes.&lt;br /&gt;
&lt;br /&gt;
We can see the''' color '''of the text is''' blue.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Focus&lt;br /&gt;
|  | '''Focus selector '''is used to '''style''' the '''input field '''when the '''element '''is focused.&lt;br /&gt;
&lt;br /&gt;
Let us try this. &lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to Style.css&lt;br /&gt;
|  | Switch to the '''Style.css''' file.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - Style.css] Type:&lt;br /&gt;
&lt;br /&gt;
input[type=text]:focus {background-color: lightgreen;}&lt;br /&gt;
|  | I will set the '''background color '''to''' green '''when the '''input text box''' is focused.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Next to the''' input text tag''', type the code as shown.&lt;br /&gt;
|-&lt;br /&gt;
|  | Press Ctrl + S&lt;br /&gt;
|  | Save the file.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to firefox&lt;br /&gt;
|  | Switch to the '''browser''' and refresh the page.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] &lt;br /&gt;
&lt;br /&gt;
Highlight the output&lt;br /&gt;
|  | Observe the output.&lt;br /&gt;
&lt;br /&gt;
Now click on the '''input field''', and see the '''background''' '''color''' changes to '''green'''.&lt;br /&gt;
&lt;br /&gt;
Now click anywhere outside the''' input field.'''&lt;br /&gt;
&lt;br /&gt;
The '''background color''' of the '''input''' '''textbox''' changes to its original color, '''light cyan.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Image&lt;br /&gt;
|  | &lt;br /&gt;
* '''background-image '''property is used to set an '''image''' inside the '''input field'''.&lt;br /&gt;
* Along with this, we can use '''background-position '''and''' background-repeat''' property&lt;br /&gt;
&lt;br /&gt;
Let us try this.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to Style.css&lt;br /&gt;
|  | Switch to the '''Style.css''' file.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - Style.css] &lt;br /&gt;
&lt;br /&gt;
Type:&lt;br /&gt;
&lt;br /&gt;
background-image:url(&amp;quot;index.png&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
background-repeat: no-repeat;&lt;br /&gt;
|  | I will set a '''background image''' with '''no repeat '''property.&lt;br /&gt;
&lt;br /&gt;
Inside the''' input text tag''', next to '''color''' property, type the code as shown.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - Style.css]&lt;br /&gt;
&lt;br /&gt;
Highlight: &amp;quot;index.png&amp;quot;&lt;br /&gt;
|  | This image is available in the '''Code Files''' link on this tutorial page.&lt;br /&gt;
&lt;br /&gt;
Please download and keep it in the folder where you have saved your code files.&lt;br /&gt;
|-&lt;br /&gt;
|  | Press Ctrl + S&lt;br /&gt;
|  | Save the file.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to firefox&lt;br /&gt;
|  | Switch to the '''browser''' and refresh the page.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] &lt;br /&gt;
&lt;br /&gt;
Highlight the output&lt;br /&gt;
|  | Observe the output.&lt;br /&gt;
&lt;br /&gt;
Our selected '''background image''' is set in the '''input field.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Only narration&lt;br /&gt;
|  | We see that the text overlaps the '''image'''.&lt;br /&gt;
&lt;br /&gt;
To solve this problem, we will use '''text-indent''' property.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to Style.css&lt;br /&gt;
|  | Switch to the '''Style.css''' file.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - Style.css] &lt;br /&gt;
&lt;br /&gt;
Type:&lt;br /&gt;
&lt;br /&gt;
text-indent: 50px;&lt;br /&gt;
|  | I will set the '''text indentation '''to''' 50 pixels.'''&lt;br /&gt;
&lt;br /&gt;
Next to the''' background-repeat '''property, type the code as shown.&lt;br /&gt;
|-&lt;br /&gt;
|  | Press Ctrl + S&lt;br /&gt;
|  | Save the file.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to firefox&lt;br /&gt;
|  | Switch to the '''browser''' and refresh the page.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] Highlight the output&lt;br /&gt;
&lt;br /&gt;
Type: Spoken&lt;br /&gt;
|  | Observe the output.&lt;br /&gt;
&lt;br /&gt;
We can see that text does not overlap the '''image'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Animation&lt;br /&gt;
|  | &lt;br /&gt;
* '''Animation''' can be done in '''forms''' using '''transition''' property.&lt;br /&gt;
* '''Transition''' property is used to change the property values over a given duration.&lt;br /&gt;
&lt;br /&gt;
Let us try this.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to Style.css&lt;br /&gt;
|  | Switch to the '''Style.css''' file.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - Style.css] Type:&lt;br /&gt;
&lt;br /&gt;
transition: width 0.2s ease-in-out;&lt;br /&gt;
|  | Inside the''' input text tag''', next to the '''text indent '''property, type the code as shown.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - Style.css] Highlight&lt;br /&gt;
&lt;br /&gt;
transition: width 0.2s;&lt;br /&gt;
|  | Here the '''transition '''property is set for '''width '''with a duration of '''0'''.'''2 seconds'''&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - Style.css] Type:&lt;br /&gt;
&lt;br /&gt;
width: 100%;&lt;br /&gt;
|  | Inside the '''input focus tag''', next to the '''background color '''property,&lt;br /&gt;
&lt;br /&gt;
Type the code as shown.&lt;br /&gt;
|-&lt;br /&gt;
|  | Press Ctrl + S&lt;br /&gt;
|  | Save the file.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to firefox&lt;br /&gt;
|  | Switch to the '''browser''' and refresh the page.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] &lt;br /&gt;
&lt;br /&gt;
Highlight the output&lt;br /&gt;
|  | Observe the output.&lt;br /&gt;
&lt;br /&gt;
Now click on the '''input field'''.&lt;br /&gt;
&lt;br /&gt;
The '''width''' of the '''input text box''' is scaled to '''100%''' of the '''web page'''.&lt;br /&gt;
&lt;br /&gt;
Now click anywhere outside the '''input field''', &lt;br /&gt;
&lt;br /&gt;
The '''width''' of the '''input textbox is '''scaled back to its previous size.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to '''my-css '''folder&lt;br /&gt;
|  | Switch to the '''my-css '''folder.&lt;br /&gt;
|-&lt;br /&gt;
|  | Point to the files &lt;br /&gt;
&lt;br /&gt;
'''MyForm.html'''&lt;br /&gt;
&lt;br /&gt;
'''formstyle.css'''&lt;br /&gt;
&lt;br /&gt;
In the file browser&lt;br /&gt;
|  | Likewise I have formatted some more '''form''' attributes in the file '''MyForm.html'''.&lt;br /&gt;
&lt;br /&gt;
I have added some '''CSS''' to '''Style''' the '''form''' in the file '''formstyle.css'''.&lt;br /&gt;
&lt;br /&gt;
This file is available in the '''Code files''' link.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - '''MyForm.html''']&lt;br /&gt;
&lt;br /&gt;
Highlight the '''div''' tags&lt;br /&gt;
|  | First we will see the '''HTML code'''.&lt;br /&gt;
&lt;br /&gt;
Open this file in any '''text editor'''&lt;br /&gt;
&lt;br /&gt;
Using the '''div tag''', I have formatted the '''form''' for better visibility.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - '''MyForm.html'''] Highlight &lt;br /&gt;
&lt;br /&gt;
class=”column1”&lt;br /&gt;
&lt;br /&gt;
class=”column2”&lt;br /&gt;
&lt;br /&gt;
class=”column3”&lt;br /&gt;
|  | Inside the '''div tag''', I have declared the '''CSS''' '''class''' named '''column1, column2 '''and '''column3.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - '''MyForm.html''']&lt;br /&gt;
&lt;br /&gt;
Highlight '''Select''' section&lt;br /&gt;
|  | Then I have included the '''select menu''' to select the '''country'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - '''MyForm.html''']&lt;br /&gt;
&lt;br /&gt;
Highlight '''Text''' area&lt;br /&gt;
|  | I have also included a '''text area''' to get the information about the '''user'''.&lt;br /&gt;
&lt;br /&gt;
It is used to get a multi-line text input from the '''user'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - '''formstyle.css''']&lt;br /&gt;
|  | Now we will have a look at the '''CSS''' file.&lt;br /&gt;
|-&lt;br /&gt;
|  | Open formstyle.css in gedit&lt;br /&gt;
|  | Switch to the '''my-css''' folder.&lt;br /&gt;
&lt;br /&gt;
Open the file '''formstyle.css''' in any '''text editor'''.&lt;br /&gt;
&lt;br /&gt;
I have opened it in the '''gedit text editor'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - '''formstyle.css'''] Highlight&lt;br /&gt;
&lt;br /&gt;
'''column''' '''1''', '''column 2, column 3''' properties&lt;br /&gt;
|  | Here I have defined all the classes '''column1,''' '''column2 '''and '''column3.'''&lt;br /&gt;
&lt;br /&gt;
Then based on my requirement I have set the '''float''', '''width''' and '''top''' '''margin''' values.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - '''formstyle.css'''] &lt;br /&gt;
&lt;br /&gt;
Highlight: '''CSS''' property for '''label'''&lt;br /&gt;
|  | For the '''label''' property, I have set the '''font''' '''weight''' to '''bold''' and '''padding''' to '''8 pixels.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - '''formstyle.css'''] &lt;br /&gt;
&lt;br /&gt;
Highlight: '''CSS''' property for '''Select''' menu&lt;br /&gt;
|  | For the '''Select''' menu, I have set some properties.&lt;br /&gt;
&lt;br /&gt;
Like '''width, padding, border, border-radius, background-color '''&amp;amp;''' color '''property'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - '''formstyle.css'''] Highlight:&lt;br /&gt;
&lt;br /&gt;
'''CSS''' property for '''input text box ''', '''textarea &amp;amp;''' '''Button'''&lt;br /&gt;
|  | Lastly I have also set some property for the '''input text box ''', '''textarea''' and '''button'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Open '''MyForm.html''' in firefox&lt;br /&gt;
|  | Switch to the '''my-css''' folder.&lt;br /&gt;
&lt;br /&gt;
Now open the file '''MyForm.html''' in a '''web browser'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] &lt;br /&gt;
|  | Observe the output.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] &lt;br /&gt;
&lt;br /&gt;
Point to the '''textarea''' boundary&lt;br /&gt;
|  | Let us resize the text area.&lt;br /&gt;
&lt;br /&gt;
Place the mouse pointer at the bottom right corner of the textarea and drag.&lt;br /&gt;
&lt;br /&gt;
To stop this resizing, we use '''resize '''property.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to formstyle.css&lt;br /&gt;
|  | Switch to the '''formstyle.css''' file.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit - '''formstyle.css]'''&lt;br /&gt;
&lt;br /&gt;
Type: resize: none;&lt;br /&gt;
|  | Inside the '''textarea tag,''' next to '''color '''property, type the code as shown.&lt;br /&gt;
|-&lt;br /&gt;
|  | Press Ctrl + S&lt;br /&gt;
|  | Save the file.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to firefox&lt;br /&gt;
|  | Switch to the '''browser''' and refresh the page.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] Highlight the output&lt;br /&gt;
|  | Observe that we cannot resize the '''textarea '''anymore.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] &lt;br /&gt;
&lt;br /&gt;
Highlight the page&lt;br /&gt;
|  | Now resize the browser width to '''600px '''or smaller.&lt;br /&gt;
&lt;br /&gt;
We see that alignment of this form has not changed. &lt;br /&gt;
&lt;br /&gt;
Note that, this representation of the '''form''' is not '''user friendly''' for small screen '''users'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Only narration&lt;br /&gt;
|  | So I will make it '''user friendly''' for small screen '''devices'''.&lt;br /&gt;
&lt;br /&gt;
For this, I will create a '''responsive form''' using the '''Media rule.'''&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Responsive Forms&lt;br /&gt;
|  | &lt;br /&gt;
* Using '''responsive''' '''forms''' we can make our '''form''' compatible for all screen sizes.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Media rule&lt;br /&gt;
|  | &lt;br /&gt;
* '''Media rule''' is used to set some '''CSS''' properties if a certain condition is true.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to Style.css&lt;br /&gt;
|  | Switch to the '''Style.css''' file.&lt;br /&gt;
|-&lt;br /&gt;
|  | [gedit '''formstyle.css]'''&lt;br /&gt;
&lt;br /&gt;
Type:&lt;br /&gt;
&lt;br /&gt;
@media screen and (max-width: 600px) {&lt;br /&gt;
&lt;br /&gt;
.column1, .column2{&lt;br /&gt;
&lt;br /&gt;
width: 100%;} }&lt;br /&gt;
|  | Next to the '''input button tag''', type the code as shown.&lt;br /&gt;
&lt;br /&gt;
Here I have used '''media''' '''rule'''.&lt;br /&gt;
&lt;br /&gt;
It sets the '''label, input text''', '''select menu, textarea '''and '''input button '''to''' 100% width'''&lt;br /&gt;
&lt;br /&gt;
This happens when the '''width''' of the '''browser window''' is '''600px '''or smaller.&lt;br /&gt;
|-&lt;br /&gt;
|  | Press Ctrl + S&lt;br /&gt;
|  | Save the file.&lt;br /&gt;
|-&lt;br /&gt;
|  | Switch to firefox&lt;br /&gt;
|  | Switch to the '''browser''' and refresh the page.&lt;br /&gt;
|-&lt;br /&gt;
|  | [Firefox] &lt;br /&gt;
&lt;br /&gt;
Highlight the output&lt;br /&gt;
|  | The '''label, input text''', '''select menu, textarea '''and '''input button '''stack on top of each other.&lt;br /&gt;
&lt;br /&gt;
This is because the '''width '''of all the '''elements '''is now set to '''100%'''.&lt;br /&gt;
|-&lt;br /&gt;
|  | Only narration&lt;br /&gt;
|  | With this we have come to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
Let us summarize.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Summary &lt;br /&gt;
|  | In this tutorial, we have learnt about:&lt;br /&gt;
&lt;br /&gt;
* Styling '''Forms '''in''' CSS '''and&lt;br /&gt;
* Customise the '''input fields''' as per our requirements&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Assignment&lt;br /&gt;
|  | As an assignment&lt;br /&gt;
&lt;br /&gt;
* Create a file '''loginpage.html'''.&lt;br /&gt;
* Obtain the following details from the user&lt;br /&gt;
** Email Address&lt;br /&gt;
** Password&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Assignment&lt;br /&gt;
|  | &lt;br /&gt;
* Add a '''select''' '''menu''' to select the '''gender'''.&lt;br /&gt;
* Add a '''button''' as '''Login'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Assignment&lt;br /&gt;
|  | &lt;br /&gt;
* Create a file '''webformstyles.css.'''&lt;br /&gt;
* Style all the '''form elements'''.&lt;br /&gt;
* Link the '''webformstyles.css''' file to '''loginpage.html''' file.&lt;br /&gt;
* Observe the output&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: About Spoken Tutorial project&lt;br /&gt;
|  | The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Spoken Tutorial Workshops&lt;br /&gt;
|  | The Spoken Tutorial Project team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Forums&lt;br /&gt;
|  | Please post your timed queries on this forum.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Acknowledgement&lt;br /&gt;
|  | Spoken Tutorial project is funded by Ministry of Education (MoE), Govt. of India.&lt;br /&gt;
|-&lt;br /&gt;
|  | Slide: Thanks&lt;br /&gt;
|  | This is Neha Solanki from IIT Bombay.&lt;br /&gt;
&lt;br /&gt;
Thank you for watching.&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	</feed>