About This Title

Pages: 128
Published: March 2024
ISBN: 9798888650523
In Print

Skill Level Meter

JavaScript Brain Teasers

Exercise Your Mind

by Faraz K. Kelhini

If you’ve ever felt the exhilaration of cracking a thorny problem or the joy of witnessing elegant code that challenges your mind, then this book is tailor-made for you. Prepare yourself to dive into a diverse array of mind-bending JavaScript brain teasers. Each puzzle is more than just a code exercise; it’s a gateway to unlocking new insights and honing your abilities. As you work through the challenges, you’ll learn to think pragmatically, optimize your code for efficiency, and avoid hidden pitfalls that can catch you off guard. What’s more—the puzzle format will help you remember what you’ve learned!

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $14.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal


Paperback Formats:

Please support indie bookstores!
Find indie bookstores in the U.S. Find indie bookstores around the world.


Over the years, JavaScript has gained a bit of a reputation for its quirky and unique characteristics. It’s important for developers to be aware of these quirks to write more robust and predictable JavaScript code. In this book, we invite you on a journey designed to unveil the intricate nuances and peculiarities that define the language’s essence.

Learn how to simulate function overloading, embed hidden information within objects, develop self-contained functions capable of maintaining their own local state, generate number sequences using functional programming, handle exotic forms of IIFEs, and prevent loss of precision when dealing with large numbers. Grasp concepts like closures, hoisting, symbols, execution context, event queue, text normalization, and more, one puzzle at a time.

Discover how to create your own custom objects that function as shortcuts, accurately calculate the length of emojis and Unicode characters, master the usage of the “this” keyword, leverage bitwise operators, and convert color names to hex notation for universal use across various platforms. Plus, steer clear of those usual traps and blunders that trip up JavaScript developers.

Forget passive learning. With JavaScript Brain Teasers, you’ll actively engage with code puzzles that require creative thinking and problem-solving, which help you memorize difficult concepts.

What You Need

Certain code examples take advantage of recently introduced JavaScript features. Therefore, it’s important to use a JavaScript environment that supports ECMAScript 2020 or a newer version. The simplest way to experiment with the examples is use your browser’s console. Just make sure your browser is up-to-date.

Resources

Releases:

  • P1.0 2024/03/22
  • P1.0 2024/03/22
  • B5.0 2024/02/29
  • B4.0 2024/01/15

Contents & Extracts

  • Preface
  • JavaScript Brain Teasers
    • Your Code Deserves a Lift
    • The Usurper
    • The Mathemagician
    • Mortal Koncatenation
    • Offbeat Identifierz
    • The Fun-ction
    • How Long Is a Pirate Flag?
    • What’s This?
    • The Flat Earth Society
    • Casting Spells With 1s and 0s
    • Dating with Math
    • What’s The Value of Math?
    • Netherlands or Holland?
    • The Permanent Closure
    • Cracking the Color Code
    • Waiting in Line
    • Chasing Promises
    • Oo Na Na Na
    • Hexorcism
    • The Arrayist
    • The Chain Master
    • The Shape Shifter
    • Alphabet Aerobics
    • Do You Trust Your Eyes?
    • Truth or Fiction?
    • On or Off?
    • The Grocery List
    • Negative Gravity
  • Crafting Puzzles
    • Crafting Your Own JavaScript Puzzle

Author

Faraz K. Kelhini is the author of Modern Asynchronous JavaScript and Text Processing with JavaScript. With a profound understanding of the JavaScript language and its intricate APIs, Faraz’s journey has been fueled by a passion for championing innovative ideas that improve the coding experience, all while crafting solutions that seamlessly harmonize creativity and functionality.

eBook Formats:

  • PDF for desktop/tablets

  • epub for Apple Books, e-readers

  • mobi for Kindle readers

Get all eBook formats here for $14.95 (USD)

Add to Cart we accept visa, mastercard, amex, discover, paypal


Paperback Formats:

Please support indie bookstores!
Find indie bookstores in the U.S. Find indie bookstores around the world.

Related Titles:

Skill Level Meter

About This Title

Pages: 128
Published: March 2024
ISBN: 9798888650523
Edition: 1
In Print