QUESTIONS

Tagged: javascript

answers  2  
views  2.9K
votes  2

[Question] In Angular what is the difference between ngRoute and ui-router  

I am not clear about the difference between ngRoute in angular-route.js and ui-route in angular-ui-router.js. One thing I noticed is that the routeconfiguration is different. Which one is the best an ...
Apr 02, 2016
Julian Gallardo
{ 15.6K - 2252 - 3 }
answers  0
views  1.7K
votes  2

[Snippet] How to return multiple values from a function in ES6  

The following function returns two variables: a credentials object and a transport string. function getEmailConfig() { let credentials = { userName: 'anthony', password: 'pass' ...
Apr 02, 2016
Anthony Perez
{ 3,866 - 759 - 1 }
answers  4
views  339
votes  1

[Question] Substring in JavaScript  

In JavaScript, how can I check if the string str1 contains another substring str2?
Sep 06, 2016
Ezio Mayur
{ 54 - 1 - 0 }
answers  1
views  101
votes  0

[Question] Display/Hide the content based on the checkbox state in jQuery  

I have a static content which I want to display if the user checks a checkbox and hide the content if the user unchecks the box.
Sep 07, 2016
Umar Sheikh
{ 50 - 1 - 0 }
answers  0
views  146
votes  0

[Article] Prototypal Inheritance in JavaScript  

JavaScript is a prototype based language. In JavaScript, you cannot define classes explicitly. It makes use of prototypes instead of classes to achieve inheritance. It derives its prototype-based inh ...
Sep 07, 2016
Ramadan Ahmed
{ 50 - 1 - 0 }
answers  0
views  222
votes  0

[Article] JavaScript runtime: Call Stack and Event Queue - Part 1  

Browser and JavaScript interaction Things like waiting for an event to occur or rendering an HTML page execute in the browser's native context. Initially, the browser waits for an event to occur, for ...
Sep 12, 2016
Raman Dhingra
{ 80 - 2 - 0 }
answers  0
views  241
votes  0

[Article] JavaScript runtime: Call Stack and Event Queue - Part 2  

Call Stack: Administering function calls This is in continuation to JavaScript runtime: Call Stack and Event Queue - Part 1 var first = function() { console.log("Hello One"); }; var second = funct ...
Sep 12, 2016
Raman Dhingra
{ 80 - 2 - 0 }
answers  0
views  315
votes  0

[Article] JavaScript runtime: Call Stack and Event Queue - Part 3  

Registering callbacks in the Event Table This is in continuation to JavaScript runtime: Call Stack and Event Queue - Part 2 When the following code is executed, btn.addEventListener('click', functio ...
Sep 12, 2016
Raman Dhingra
{ 80 - 2 - 0 }
answers  0
views  389
votes  0

[Article] JavaScript runtime: Call Stack and Event Queue - Part 4  

This is in continuation to JavaScript runtime: Call Stack and Event Queue - Part 3 The setTimeout() is the JavaScript's asynchronous function. It accepts two arguments: a callback function and a time ...
Sep 12, 2016
Raman Dhingra
{ 80 - 2 - 0 }
answers  0
views  332
votes  0

[Article] JavaScript runtime: Call Stack and Event Queue - Part 5  

This is in continuation to JavaScript runtime: Call Stack and Event Queue - Part 4 <!DOCTYPE html> <html> <head> <title>Stack-Queue</title> <link href="assets/css/bootstrap.css" rel="stylesh ...
Sep 12, 2016
Raman Dhingra
{ 80 - 2 - 0 }
answers  1
views  345
votes  0

[Question] Getting and Setting the value from an input text field with jQuery  

I have an input text field <input type="text" id="empName"/> I need to write a value to this field and retrieve the existing value using jQuery? How can I do that?
Sep 23, 2016
Vanja Paterno
{ 50 - 1 - 0 }
answers  2
views  264
votes  0

[Question] Scroll to Top using JavaScript/jQuery  

I have infinite scrolling implemented in a page. I need to provide a button or a simple link which when clicked lets the user scroll to the top of the page. How can I implement it using jQuery or plai ...
Sep 30, 2016
Marijo Jordan
{ 50 - 1 - 0 }
answers  2
views  580
votes  0

[Question] Let text field only accept numerical values using jQuery  

I have a following input text field: <p>Age: <input type="text" id="age"></p> I need that the user should be able to type only numeric characters 0-9 in this field. How is it possible using jQuery?
Oct 12, 2016
Klement Koranteng
{ 50 - 1 - 0 }
answers  0
views  264
votes  0

[Question] What exactly does import and export do in JavaScript?  

What exactly does import and export do in the new ECMAScript standard for JavaScript? And how does this relate to modules? Actually I am not confident with modules either.
Apr 02, 2016
Tanika Kannan
{ 50 - 1 - 0 }
answers  0
views  109
votes  0

[Question] Differences between e.preventDefault(), e.stopPropagation(), and return false;  

In my code I want to prevent other event handlers from executing. I am always struggling to understand which of the following methods is the most appropriate, so in my own work I use all three (which ...
Apr 02, 2016
Panos Andreas
{ 75 - 2 - 0 }
20  posts
You may also like
When to use 'ref' and 'out' keywords - specifically with strings?
Visual Studio 2015 F10 Debugger key not working
Horizontally centering a <div> inside another <div>
How to Encrypt and Decrypt a string in C#
Server Side Rendering in JavaScript?
Curlybrackets Software
The source code for Curlybrackets (C#/.NET/SQL Server) is available for purchase here. Start your own Q+A site now!

Easily create custom post types: messages, ideas, questions, tickets, whatever.

The Software Pack is a great place to start your corporate Q+A customer support site.