Message from JavaScript discussions

October 2020

— Https://


The point of my question is, why would I use this in a real-world application? Seems like I could use $set to what the $min and $max do

— * to do what

— Hai

— Project status😑

— Masters and slaves! 😱

— Debt to tradition🤤

— What javascript show wrong result will sorting -ve numbers

— Oh noes 2020

— Hello everyone.
This is my first post in here. So hello and thank you for adding me.

I actually have a little problem and I'm really desperate I tried everything but didn't succeed.

I wanted to add languages to my webpage and make it a multi language page so I used the following js code:

let langs = ['en', 'it', 'sp', 'sv', 'de', 'pt', 'nl'];
let lang = 'en';

function setStyles(styles) {
var elementId = '__lang_styles';
var element = document.getElementById(elementId);
if (element) {

let style = document.createElement('style'); = elementId;
style.type = 'text/css';

if (style.styleSheet) {
style.styleSheet.cssText = styles;
} else {

function setLang(lang) {

function setLangStyles(lang) {
let styles = langs
.filter(function (l) {
return l != lang;
.map(function (l) {
return ':lang('+ l +') { display: none; }';
.join(' ');


I named it "lang.js" and I tagged it on my html this way:

<!-- jquery -->
<script src="js/jquery-2.1.4.min.js"></script>
<!-- Bootstrap -->
<script src="js/bootstrap.min.js"></script>
<script src="js/scripts.js"></script>
<script src="js/lang.js"></script>

Locally it works perfectly, but when it's on server, it doesn't open the webpage at all, all I see is a blank page.

I tried also to write it inside the html with <script> tag, it didn't work either.

In network tab of dev tools, the jquery-2.1.4.min.js file and bootstrap files showing as 200 status.

There are no errors on the console dev.

Can anyone help please?

Thank you in advance


Message permanent page

— "doesnt open" means network failed, right

— I don't really know. It just gives a blank page