JavaScript Coding Facts You Didnt Know! 2024 🚀🧑‍💻

Опубликовано: 11 Сентябрь 2024
на канале: Simply Coder
36

hey guys, here are some interesting facts that you didn't know about javascript.

1. JavaScript is Not Java
Despite the name, JavaScript has almost no relation to Java. The name was a marketing tactic when Java was popular. JavaScript’s official name was originally "Mocha," then changed to "LiveScript," and finally to "JavaScript" in 1995.
2. JavaScript Can Run Outside the Browser
While JavaScript is commonly associated with the browser, tools like Node.js allow it to run on servers, desktops, and IoT devices. This makes JavaScript a full-fledged general-purpose language, not just a scripting language for web pages.
3. JavaScript Engines Use Just-in-Time Compilation
JavaScript engines like Google’s V8 (used in Chrome and Node.js) do Just-in-Time (JIT) compilation, which compiles code during execution, making it faster. JavaScript was once an interpreted language, but now modern engines optimize it dynamically.
4. Falsy Values
JavaScript has six falsy values: false, 0, "" (empty string), null, undefined, and NaN. These values are evaluated to false in conditionals. For example, if(0) will not execute because 0 is falsy.
5. Objects and Arrays Can Be Indexed with Strings
Arrays in JavaScript can actually be indexed with strings. While arrays are typically indexed with integers, nothing stops you from using strings.


Смотрите видео JavaScript Coding Facts You Didnt Know! 2024 🚀🧑‍💻 онлайн без регистрации, длительностью 49 секунд в хорошем hd качестве. Это видео добавил пользователь Simply Coder 11 Сентябрь 2024, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 36 раз и оно понравилось людям.