The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [javascript]

JavaScript (not to be confused with Java) is a high-level, dynamic, multi-paradigm, weakly-typed language used for both client-side and server-side scripting. Use this tag for questions regarding common implementations of ECMAScript, JavaScript, JScript, etc. JS does not typically refer to its ECMA-cousin, ActionScript.

Filter by
Sorted by
Tagged with
-1
votes
1answer
77 views

keeping of all javascript functions in one place [duplicate]

In php website I am using different javascript functions in different pages for example page a calls functions 1,2,3 and page b calls functions 2, 4, 6 and page c calls functions 3, 6 can I place ...
-1
votes
1answer
134 views

gnu lesser general public license question [closed]

I have a question about Thingiviews license. I have a site that has to do with 3D Printing, it is not done yet but I was wondering if I would be able to use it on my site, The big reason I am asking ...
-1
votes
2answers
385 views

How Challenging is it to Mix Pure JS with CoffeeScript on a Team? [closed]

I keep running into Senior JS positions where they want CoffeeScript. The reason I don't use CoffeeScript is that my first impression of it was that it puts limitations on JS OOP features that I find ...
-1
votes
1answer
129 views

Does avoiding Promises and Async leads to clean code?

While applying for a job interview I found this line in requirements. Experience with clean code writing practices like avoiding callback hell like promises, async Does this line make any sense ? ...
-1
votes
1answer
142 views

Three.js Screen Tear

Using Three.js Revision 51 (Yes I know the latest is 84) I am getting a screen tear at random times on the load of my page. It seems like it's 50% whether it's a hard refresh or a fresh load of the ...
-1
votes
1answer
514 views

Adobe Acrobat folder level scripts

I am trying to find ínformation on how and where to write folder level scripts for Adobe Acrobat and Adobe Photoshop. This is what I found from Adobe: https://acrobatusers.com/tutorials/...
-1
votes
1answer
99 views

Sublime navigation [closed]

I need to navigate to js method source that I'm calling in sublime (for java script file). I try 'Ctrl'+'click method name' and nothing happens (It works for almost all IDE (eclipse, sts, netbeans, ...
-1
votes
1answer
133 views

node deep file indexer module cannot go deep [closed]

I'm trying to make a file indexer by node.js. The program is supposed to index files and folders in an array and also check inside folders and add all sub folders and files I wrote: fs.readdir(...
-2
votes
4answers
967 views

New “delay” keyword for JavaScript

I had a great idea for a new javascript keyword "delay", but I don't know what I can do to bring it to the new specification. Also I want to know what you guys think about it and if it's even ...
-2
votes
1answer
825 views

is it good practice to reload a div every second [closed]

I am working on a networking site where I need to reload the notification div every second. I wanted to know is it good or bad to load it every second as there are some other divs also loading after ...
-2
votes
1answer
555 views

Choosing the right architecture for my web application

I've started working on my web application and I'm stuck at the design stage. I cannot decide which web technologies would be the most suited to this project. Let me explain what I want to achieve: 1)...
-2
votes
2answers
1k views

Do I need to learn Javascript to make decent websites? [closed]

Hello I have been using C++ and Java for years. For better or for worse, I have always looked at JavaScript as not as powerful as these languages and therefore probably not worth my time and effort to ...
-2
votes
3answers
181 views

Code design: introduce new method vs add optional parameter to existing method

In JavaScript (ES6), I can have optional function parameter with default value. So to add a new behavior to the existing code base, I could either introduce new method(s) or extend the existing method ...
-2
votes
1answer
133 views

Is there a way to recreate the code behind the for loop?

My question is, how would I go about making a function that serves the same purpose of the for loop, without using any loop method. function fl (initial, condition, iterator, code){ i = initial; ...
-2
votes
3answers
1k views

JavaScript Phone Screen [closed]

For a simple phone screen question we generally always ask about scoping rules. It's clearly one of the biggest gotchas of JavaScript. Out of everyone we ask almost everyone insists that in an if or ...
-2
votes
1answer
965 views

Recently moved from Java to JavaScript on Node.js, how to maintain code?

I recently moved from Java to JavaScript on Node.js. I was very excited, opened up my IntelliJ IDE for an existing Node.js project only to find I cannot know what the parameters I see functions ...
-2
votes
1answer
997 views

Develop a website using mustache.js and PHP [closed]

I'm thinking of building a website using mustache.js to render the website and having PHP as the backend. The PHP will then mainly contain queries to the database and some SESSION checkings. ...
-2
votes
1answer
184 views

Mobile compatible JEE application [closed]

Does using frameworks like AngularJS/Backbone JS/Bootstrap/Foundation etc. automatically make the web application mobile device compatible? Is there a framework/design approach to make applications (...
-2
votes
1answer
185 views

PHP developer, how to solve javascript related issues in a program with millions of line [closed]

I am expert in PHP. There are some JavaScript related bugs in my assignment given by my supervisor. I tried to fix them using Firebug. It is time consuming. Is there any other ways? Are there any ...
-2
votes
1answer
2k views

Password Validation using regular expressions in html 5 [closed]

this question may sound stupid, but no one has ever taught me this. I have an HTML input for a password field, and you can only log on with one specific password with JS. Could someone please give me ...
-2
votes
1answer
750 views

Add method to existing class you don't own in javascript

Is it still called monkey patching if you are only adding new methods instead of changing existing method behavior? What is this called? Example: String.prototype.contains = function(needle) { ...
-2
votes
1answer
14k views

How to make .exe file from html5 css application? [closed]

I would like to make windows desktop application using HTML5, JavaScript and CSS. I am trying tidesdk XULRunner appjs I read the documentations of these technologies. But I didn't see how to export ...
-2
votes
0answers
61 views

What is a good way to structure a web site as part of a bigger site?

OK, I have a abstract question what ways you suggest to structure a subproject of a existing website. I first describe what I have and what I want to achieve: There is a homepage in a CMS (Joomla) ...
-2
votes
2answers
196 views

How to find all occurrences of a variable within a source code?

The title is pretty self-explanatory. I have a minified JavaScript code (100k+ lines) and would like to find all occurrences of a particular variable so I could rename it to better understand code. Is ...
-2
votes
1answer
91 views

Deleting dynamic elements from a database [closed]

I have a select dropdown, with '+' and '-' buttons that add and remove items before submission. I would like to be able to remove the elements with the '-' button after they have been added to the ...
-3
votes
2answers
475 views

Are Java and JavaScript converging? [closed]

It seems to me that Java was the computing language that could be used anywhere and JavaScript was the scripting language for the web and things stayed that way for a long while. There are countless ...
-3
votes
1answer
446 views

Why is the JavaScript-language different in different programs/sites? [closed]

I'm kind of new to programming and i have a question that's been bothering me for awhile. Why is the JavaScript-language different in different programs/sites. I've used Codecademy to practice and i'...
-3
votes
3answers
2k views

why is remainder of division, multiplied by divisor ? using operator %

I have started to learn Javascript. From book http://eloquentjavascript.net: There is one more arithmetic operator which is probably less familiar to you. The % symbol is used to represent the ...
-3
votes
1answer
99 views

How compiler and interpreter both are used in one language? [closed]

After writing the complete code the compiler compile the whole code at a time , but on the other hand interpreter take single line at a time. Both the compiler and interpreter are mostly called the ...
-3
votes
4answers
288 views

Might there be two types of a “callback” in programming? [closed]

I know two definitions for a "Callback": A function that is being called-after ("called-back when") a certain event is triggered. A function that is passed to another function as a parameter. An ...
-3
votes
2answers
234 views

Is this an anti pattern in Javascript?

A common pattern I've been using for JS/NodeJS applications is the following: import { utility1, utility2 } function exampleScript() { utility1() utility2() // Does something } Basically my main ...
-3
votes
1answer
621 views

Why does an expression for a Javascript function that returns void still execute? [closed]

I'm so confused about how Void operator (in javascript) works and what is it's role. as i read, Void is an operator that evaluate an expression without returning a value, but by executing that script ...
-3
votes
1answer
1k views

Dictionary representation of an object

As python memory model is dictionaries of dictionaries, looks like any object in JavaScript has similar representation. Below code, > foo = {} makes foo as an empty dictionary {}. fine. If code ...
-3
votes
1answer
59 views

How does event.target return the DOM object?

I read through documentation and searched on google, but couldn't find a specific answer. Currently, I have an object that subscribes to a click event. I am trying to understand how a view that ...
-3
votes
1answer
68 views

Creating a multiplatform (IOS, Javascript, and JAVA) linked user account database

I have done weeks researching this question for my App Idea. Background of the APP - Simply a multi crypto currency wallet which users sign up with ONLY username and Password - no email, FB, or ...
-3
votes
1answer
217 views

How to make your JavaScript private? [duplicate]

I wanted to know if there is a way to make your JavaScript private from client side?
-3
votes
1answer
5k views

How can I do to use Angular 5/6 for frontend and Codeigniter 3 for backend in the same web app?

I have this project I want to do, using Angular 5/6 for frontend and Codeigniter 3 for backend. The problem is that I don't know how to combine the two, and all the tutorials I looked were using ...
-3
votes
1answer
56 views

Adding links to posts using RegEx - should it be server side or client side?

I am working on adding a feature to a forum where I look for keywords in posts and add links to these keywords. For example, say a user's post includes the phrase "HP Printers". This phrase would be ...
-3
votes
1answer
287 views

Is it better to have a single, more general directive or multiple type based directives in Angular?

Is it considered good practice to have: Single, general directive that has multiple data-* parameters and serial data is binded from controller Single, general directive that has config and serial ...
-3
votes
0answers
76 views

Is Web Assembly able to multithread?

Javascript can not multithread, and to the extent it does, it is done with something called "workers". Will this be the same with WebAssembly? Why or why not?
-3
votes
1answer
94 views

Is there a best practice for naming class selectors for identification alone

Is there a best practice for naming class selectors for identification alone? For example, for defining a single amount field with action button, we end up creating several div containers and div ...
-3
votes
1answer
47 views

Passing dynamic data to declarative resource load tags in an HTML document?

Is it possible to pass dynamic data to the browser when it automatically GETs link and img and script etc tags after it has parsed the html containing them? Ultimately would want to pass an ...
-3
votes
1answer
1k views

Simple Javascript Validation not working [closed]

I am trying to do the following: HTML Code <body> <form name="myform"> <table> <tr> <td>First Name:</td> <td><...
-4
votes
1answer
159 views

Did GO embrace any language construct introduced in Java?

GO has embraced, 1) JavaScript/Python language constructs, Higher order function Closure Slicing Range operator Anonymous function(inner function) Provides abstractions ...
-4
votes
1answer
93 views

What is the truh concerning pasting data into a browser? [closed]

I am hearing a ton of different info. I just found this in a site The 'paste' operation in the context menu or button press is not possible. It is not possible because of a browser security ...
-4
votes
2answers
3k views

Reliable device/browser/OS detection [closed]

Is there some reliable way to detect device/browser/OS of web page visitors except using the user agent string? This is not for rendering/functionality of the web page/application, but only for ...
-4
votes
1answer
6k views

Using forEach on empty array [duplicate]

I have a dynamic array that can often be empty, and I need to iterate over all its elements. So far I have such code: array.forEach(function(item, index) { //stuff here }); It works fine of ...
-4
votes
1answer
150 views

Rewrite legacy code or continue to live with it [duplicate]

Last year I decided to create a web-based SAP Business One extension system consisting of a JavaScript SPA written with Aurelia that communicates with two REST backends written in Go and Java (...
-4
votes
1answer
1k views

How does the typescript transpile function work

Assume the following: /// file.ts var x = "hello"; x = 1; console.log(x); /// file.ts function transpile(fileName) { ... } What steps would typescript take to transpile the file? How and when ...
-4
votes
0answers
12 views

Nested Json response from NodeJs and MySql

I have 3 Mysql tables, a vendor table with a list of vendors, a categories table with a list of categories that these vendors have in there stores, the categories table is linked to to the vendors ...