SlideShare a Scribd company logo
1 of 13
First thing you should know is that we
used a function to run loops in it.
You decide the name of the function,
in this case we decided to name it
“input” because the user of adnoto will
input text.
We will be using a series of variables
(var). In this case the first variable is
called “string” because the user will
input a string of text in the box.
Then we will modify the variable. We do
this by recalling the variable and then
adding a series of commands that will
change the variable so that we can use it.
In this case the first step was to get rid of
punctuation because we are interested
just in tagging words. If we didn’t replace
all of the punctuation, the program would
differentiate between “word” and “word,”
and we don’t want that because they are
the same.
The next step was to make all of the words
to be in lower case. This is necessary
because when Javascript sorts words in
alphabetical order, it first sorts all the
words that begin with a capital letter and
then the ones that don’t. Since we are
building a glossary, capitalization is not
important and messes up our glossary.
Then we create a new variable called
textArr, that stands for text array. An
array in Javascript is a collection of
different items. To know what will
constitute each item of the array, we
separate the string by using split and our
criteria is that everything that is followed
by a space will constitute an item of the
array.
Finally we order each item of the array by
using sort.
We run into the loops. We made a
chain of loops but I’ll explain what
happens in each one of them.
The first loop goes through the array
item by item.
The second loop starts on the second
item of the array (i+1) and also goes
through the entire array item by item.
If at any point of their journey through
the array, both stumble into elements
that are equal…
…we run the third loop that will
compare the next elements of the
array to see if they are also equals and
get rid of them
Finally, the last loop of the chain goes
through the array again and looks up
for the empty spaces that the repeated
words left (undefined) and gets rid of
them as well.
We then create a new loop that goes
through the array again with all the
modifications and print each element
of it with the tags that we choose.

More Related Content

Viewers also liked

Enhancing collaboration using web 2.0
Enhancing collaboration using web 2.0Enhancing collaboration using web 2.0
Enhancing collaboration using web 2.0RiGo Balladares
 
Chapter v Enhancing Collaboration Using Web 2
Chapter v  Enhancing Collaboration Using Web 2Chapter v  Enhancing Collaboration Using Web 2
Chapter v Enhancing Collaboration Using Web 2Francis Velasquez
 
129 maneiras-de-gerar-trafego-em-seu-
129 maneiras-de-gerar-trafego-em-seu-129 maneiras-de-gerar-trafego-em-seu-
129 maneiras-de-gerar-trafego-em-seu-Mestre Search
 
Семейства Покрытосеменных
Семейства ПокрытосеменныхСемейства Покрытосеменных
Семейства Покрытосеменныхdsyuru
 
Venda de eletrônicos
Venda de eletrônicos Venda de eletrônicos
Venda de eletrônicos blogtecnoword
 
Manual on Skill Testing and Certification ILO Jordan
Manual on Skill Testing and Certification ILO JordanManual on Skill Testing and Certification ILO Jordan
Manual on Skill Testing and Certification ILO JordanYasser Ali
 
P 4 torre de enfriamiento 2015
P 4 torre de enfriamiento 2015P 4 torre de enfriamiento 2015
P 4 torre de enfriamiento 2015fercanove
 
بيان باسماء المتقدمين لشغل وظيفة اخصائى وثائق ومكتبات ثالث بكلية الطب ومستشفى...
بيان باسماء المتقدمين لشغل وظيفة اخصائى وثائق ومكتبات ثالث بكلية الطب ومستشفى...بيان باسماء المتقدمين لشغل وظيفة اخصائى وثائق ومكتبات ثالث بكلية الطب ومستشفى...
بيان باسماء المتقدمين لشغل وظيفة اخصائى وثائق ومكتبات ثالث بكلية الطب ومستشفى...مكتبات اون لاين
 

Viewers also liked (12)

Naveen_Profile
Naveen_ProfileNaveen_Profile
Naveen_Profile
 
Enhancing collaboration using web 2.0
Enhancing collaboration using web 2.0Enhancing collaboration using web 2.0
Enhancing collaboration using web 2.0
 
Guia bpa-quinua
Guia bpa-quinuaGuia bpa-quinua
Guia bpa-quinua
 
Chapter v Enhancing Collaboration Using Web 2
Chapter v  Enhancing Collaboration Using Web 2Chapter v  Enhancing Collaboration Using Web 2
Chapter v Enhancing Collaboration Using Web 2
 
129 maneiras-de-gerar-trafego-em-seu-
129 maneiras-de-gerar-trafego-em-seu-129 maneiras-de-gerar-trafego-em-seu-
129 maneiras-de-gerar-trafego-em-seu-
 
Pancreatitis
PancreatitisPancreatitis
Pancreatitis
 
Семейства Покрытосеменных
Семейства ПокрытосеменныхСемейства Покрытосеменных
Семейства Покрытосеменных
 
Venda de eletrônicos
Venda de eletrônicos Venda de eletrônicos
Venda de eletrônicos
 
Manual on Skill Testing and Certification ILO Jordan
Manual on Skill Testing and Certification ILO JordanManual on Skill Testing and Certification ILO Jordan
Manual on Skill Testing and Certification ILO Jordan
 
P 4 torre de enfriamiento 2015
P 4 torre de enfriamiento 2015P 4 torre de enfriamiento 2015
P 4 torre de enfriamiento 2015
 
Food systems
Food systemsFood systems
Food systems
 
بيان باسماء المتقدمين لشغل وظيفة اخصائى وثائق ومكتبات ثالث بكلية الطب ومستشفى...
بيان باسماء المتقدمين لشغل وظيفة اخصائى وثائق ومكتبات ثالث بكلية الطب ومستشفى...بيان باسماء المتقدمين لشغل وظيفة اخصائى وثائق ومكتبات ثالث بكلية الطب ومستشفى...
بيان باسماء المتقدمين لشغل وظيفة اخصائى وثائق ومكتبات ثالث بكلية الطب ومستشفى...
 

Similar to adnoto

OCA Java SE 8 Exam Chapter 3 Core Java APIs
OCA Java SE 8 Exam Chapter 3 Core Java APIsOCA Java SE 8 Exam Chapter 3 Core Java APIs
OCA Java SE 8 Exam Chapter 3 Core Java APIsİbrahim Kürce
 
Please Please Please Read the instructions and do everything li.docx
Please Please Please Read the instructions and do everything li.docxPlease Please Please Read the instructions and do everything li.docx
Please Please Please Read the instructions and do everything li.docxtienmixon
 
javastringexample problems using string class
javastringexample problems using string classjavastringexample problems using string class
javastringexample problems using string classfedcoordinator
 
16 Java Regex
16 Java Regex16 Java Regex
16 Java Regexwayn
 
Lab 1 Recursion  Introduction   Tracery (tracery.io.docx
Lab 1 Recursion  Introduction   Tracery (tracery.io.docxLab 1 Recursion  Introduction   Tracery (tracery.io.docx
Lab 1 Recursion  Introduction   Tracery (tracery.io.docxsmile790243
 
Java string handling
Java string handlingJava string handling
Java string handlingSalman Khan
 
Scala Language Intro - Inspired by the Love Game
Scala Language Intro - Inspired by the Love GameScala Language Intro - Inspired by the Love Game
Scala Language Intro - Inspired by the Love GameAntony Stubbs
 
Functional Objects & Function and Closures
Functional Objects  & Function and ClosuresFunctional Objects  & Function and Closures
Functional Objects & Function and ClosuresSandip Kumar
 
computer notes - List implementation
computer notes - List implementationcomputer notes - List implementation
computer notes - List implementationecomputernotes
 
Compositionality and Category Theory - a montage of slides/transcript for sec...
Compositionality and Category Theory - a montage of slides/transcript for sec...Compositionality and Category Theory - a montage of slides/transcript for sec...
Compositionality and Category Theory - a montage of slides/transcript for sec...Philip Schwarz
 
Requirements Use JavaDo Not Use RecursionDo Not Use Array Lis.pdf
Requirements Use JavaDo Not Use RecursionDo Not Use Array Lis.pdfRequirements Use JavaDo Not Use RecursionDo Not Use Array Lis.pdf
Requirements Use JavaDo Not Use RecursionDo Not Use Array Lis.pdfalphaagenciesindia
 
String & path functions in vba
String & path functions in vbaString & path functions in vba
String & path functions in vbagondwe Ben
 

Similar to adnoto (20)

lec14.pdf
lec14.pdflec14.pdf
lec14.pdf
 
OCA Java SE 8 Exam Chapter 3 Core Java APIs
OCA Java SE 8 Exam Chapter 3 Core Java APIsOCA Java SE 8 Exam Chapter 3 Core Java APIs
OCA Java SE 8 Exam Chapter 3 Core Java APIs
 
String handling
String handlingString handling
String handling
 
Day_5.1.pptx
Day_5.1.pptxDay_5.1.pptx
Day_5.1.pptx
 
Please Please Please Read the instructions and do everything li.docx
Please Please Please Read the instructions and do everything li.docxPlease Please Please Read the instructions and do everything li.docx
Please Please Please Read the instructions and do everything li.docx
 
javastringexample problems using string class
javastringexample problems using string classjavastringexample problems using string class
javastringexample problems using string class
 
LectureNotes-04-DSA
LectureNotes-04-DSALectureNotes-04-DSA
LectureNotes-04-DSA
 
Python tuple
Python   tuplePython   tuple
Python tuple
 
16 Java Regex
16 Java Regex16 Java Regex
16 Java Regex
 
easyPy-Basic.pdf
easyPy-Basic.pdfeasyPy-Basic.pdf
easyPy-Basic.pdf
 
Lab 1 Recursion  Introduction   Tracery (tracery.io.docx
Lab 1 Recursion  Introduction   Tracery (tracery.io.docxLab 1 Recursion  Introduction   Tracery (tracery.io.docx
Lab 1 Recursion  Introduction   Tracery (tracery.io.docx
 
Arrays in c++
Arrays in c++Arrays in c++
Arrays in c++
 
Java string handling
Java string handlingJava string handling
Java string handling
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Scala Language Intro - Inspired by the Love Game
Scala Language Intro - Inspired by the Love GameScala Language Intro - Inspired by the Love Game
Scala Language Intro - Inspired by the Love Game
 
Functional Objects & Function and Closures
Functional Objects  & Function and ClosuresFunctional Objects  & Function and Closures
Functional Objects & Function and Closures
 
computer notes - List implementation
computer notes - List implementationcomputer notes - List implementation
computer notes - List implementation
 
Compositionality and Category Theory - a montage of slides/transcript for sec...
Compositionality and Category Theory - a montage of slides/transcript for sec...Compositionality and Category Theory - a montage of slides/transcript for sec...
Compositionality and Category Theory - a montage of slides/transcript for sec...
 
Requirements Use JavaDo Not Use RecursionDo Not Use Array Lis.pdf
Requirements Use JavaDo Not Use RecursionDo Not Use Array Lis.pdfRequirements Use JavaDo Not Use RecursionDo Not Use Array Lis.pdf
Requirements Use JavaDo Not Use RecursionDo Not Use Array Lis.pdf
 
String & path functions in vba
String & path functions in vbaString & path functions in vba
String & path functions in vba
 

Recently uploaded

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 

Recently uploaded (20)

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 

adnoto

  • 1. First thing you should know is that we used a function to run loops in it. You decide the name of the function, in this case we decided to name it “input” because the user of adnoto will input text.
  • 2. We will be using a series of variables (var). In this case the first variable is called “string” because the user will input a string of text in the box.
  • 3. Then we will modify the variable. We do this by recalling the variable and then adding a series of commands that will change the variable so that we can use it. In this case the first step was to get rid of punctuation because we are interested just in tagging words. If we didn’t replace all of the punctuation, the program would differentiate between “word” and “word,” and we don’t want that because they are the same.
  • 4. The next step was to make all of the words to be in lower case. This is necessary because when Javascript sorts words in alphabetical order, it first sorts all the words that begin with a capital letter and then the ones that don’t. Since we are building a glossary, capitalization is not important and messes up our glossary.
  • 5. Then we create a new variable called textArr, that stands for text array. An array in Javascript is a collection of different items. To know what will constitute each item of the array, we separate the string by using split and our criteria is that everything that is followed by a space will constitute an item of the array.
  • 6. Finally we order each item of the array by using sort.
  • 7. We run into the loops. We made a chain of loops but I’ll explain what happens in each one of them.
  • 8. The first loop goes through the array item by item.
  • 9. The second loop starts on the second item of the array (i+1) and also goes through the entire array item by item.
  • 10. If at any point of their journey through the array, both stumble into elements that are equal…
  • 11. …we run the third loop that will compare the next elements of the array to see if they are also equals and get rid of them
  • 12. Finally, the last loop of the chain goes through the array again and looks up for the empty spaces that the repeated words left (undefined) and gets rid of them as well.
  • 13. We then create a new loop that goes through the array again with all the modifications and print each element of it with the tags that we choose.