Reader small image

You're reading from  JavaScript from Beginner to Professional

Product typeBook
Published inDec 2021
Reading LevelBeginner
PublisherPackt
ISBN-139781800562523
Edition1st Edition
Languages
Tools
Right arrow
Authors (3):
Laurence Lars Svekis
Laurence Lars Svekis
author image
Laurence Lars Svekis

Laurence Svekis is an experienced web application developer. He has worked on multiple enterprise-level applications, hundreds of websites, business solutions, and many unique and innovative web applications. He has expertise in HTML, CSS, JavaScript, jQuery, Bootstrap, PHP, and MySQL and is also passionate about web technologies, web application development, programming, and online marketing with a strong focus on social media and SEO. He is always willing to help his students experience what technology has to offer and looks forward to sharing his knowledge and experiences with the world.
Read more about Laurence Lars Svekis

Maaike van Putten
Maaike van Putten
author image
Maaike van Putten

Maaike is a software consultant and trainer with a passion for sharing her expertise to empower others in their careers. Her love for software development shows in the numerous software development projects she participated in and the many certifications she obtained. She has designed and delivered a broad spectrum of training courses catering to beginners and seasoned developers in Java, Python, C# and many other languages and frameworks. Next to that, she has authored multiple books and online courses through multiple platforms reaching over 500,000 learners across the globe.
Read more about Maaike van Putten

Codestars By Rob Percival
Codestars By Rob Percival
author image
Codestars By Rob Percival

Rob Percival is a highly regarded web developer and Udemy instructor with over 1.7 million students. Over 500,000 of them have taken Rob's Complete Web Developer Course 2.0, as well as his Android Developer and iOS Developer courses.
Read more about Codestars By Rob Percival

View More author details
Right arrow

Chapter projects

Word scrambler

Create a function that returns a value of a word and scrambles the letter order with Math.random():

  1. Create a string that will hold a word value of your choice.
  2. Create a function that can intake a parameter of the string word value.
  3. Just like an array, strings also have a length by default. You can use this length to set the loop maximum value. You will need to create a separate variable to hold this value as the length of the string will be decreasing as the loop continues.
  4. Create an empty temporary string variable that you can use to hold the new scrambled word value.
  5. Create a for loop that will iterate the number of letters within the string parameter starting at 0 and iterating until the original length value of the string is reached.
  6. Create a variable that will randomly select one letter using its index value, with Math.floor() and Math.random() multiplied by the current length of the string.
  7. Add...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
JavaScript from Beginner to Professional
Published in: Dec 2021Publisher: PacktISBN-13: 9781800562523

Authors (3)

author image
Laurence Lars Svekis

Laurence Svekis is an experienced web application developer. He has worked on multiple enterprise-level applications, hundreds of websites, business solutions, and many unique and innovative web applications. He has expertise in HTML, CSS, JavaScript, jQuery, Bootstrap, PHP, and MySQL and is also passionate about web technologies, web application development, programming, and online marketing with a strong focus on social media and SEO. He is always willing to help his students experience what technology has to offer and looks forward to sharing his knowledge and experiences with the world.
Read more about Laurence Lars Svekis

author image
Maaike van Putten

Maaike is a software consultant and trainer with a passion for sharing her expertise to empower others in their careers. Her love for software development shows in the numerous software development projects she participated in and the many certifications she obtained. She has designed and delivered a broad spectrum of training courses catering to beginners and seasoned developers in Java, Python, C# and many other languages and frameworks. Next to that, she has authored multiple books and online courses through multiple platforms reaching over 500,000 learners across the globe.
Read more about Maaike van Putten

author image
Codestars By Rob Percival

Rob Percival is a highly regarded web developer and Udemy instructor with over 1.7 million students. Over 500,000 of them have taken Rob's Complete Web Developer Course 2.0, as well as his Android Developer and iOS Developer courses.
Read more about Codestars By Rob Percival