Click here to Skip to main content
15,879,239 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: How can I avoid the phenomenon of asynchronous code using promises and async/await? Pin
Nathan Minier18-Nov-19 1:35
professionalNathan Minier18-Nov-19 1:35 
AnswerRe: How can I avoid the phenomenon of asynchronous code using promises and async/await? Pin
Richard Deeming18-Nov-19 7:47
mveRichard Deeming18-Nov-19 7:47 
Questionclient's windows login name Pin
kishor kumar S H16-Nov-19 23:47
kishor kumar S H16-Nov-19 23:47 
AnswerRe: client's windows login name Pin
Eddy Vluggen17-Nov-19 0:41
professionalEddy Vluggen17-Nov-19 0:41 
AnswerRe: client's windows login name Pin
Nathan Minier18-Nov-19 1:40
professionalNathan Minier18-Nov-19 1:40 
GeneralRe: client's windows login name Pin
kishor kumar S H18-Nov-19 21:49
kishor kumar S H18-Nov-19 21:49 
GeneralRe: client's windows login name Pin
Nathan Minier19-Nov-19 0:45
professionalNathan Minier19-Nov-19 0:45 
GeneralRe: client's windows login name Pin
kishor kumar S H23-Nov-19 17:54
kishor kumar S H23-Nov-19 17:54 
Question!!Please Help!! Student Needs Help It Shows me exercise 2 is correct but exercise 1 is not defined JS assign 3 and 13 Pin
Member 1465076510-Nov-19 11:20
Member 1465076510-Nov-19 11:20 
AnswerRe: !!Please Help!! Student Needs Help It Shows me exercise 2 is correct but exercise 1 is not defined JS assign 3 and 13 Pin
Richard MacCutchan10-Nov-19 22:23
mveRichard MacCutchan10-Nov-19 22:23 
QuestionGetting this following error: compare.js:1 Uncaught Error: Cannot find module 'ember' Pin
simpledeveloper5-Nov-19 9:26
simpledeveloper5-Nov-19 9:26 
I am trying to write a javascript helper function in my Ember application called compare.js, and that js file is trying to import Ember, where its throwing error, can anybody please suggest me something how to get-rid of this type errors? Here is my compare.js files code - thank you.
import Ember from 'ember';

    export function compare(params) {
        if (params[3]) {  //handle case insensitive conditions if 4 param is passed.
            params[0] = params[0].toLowerCase();
            params[2] = params[2].toLowerCase();
        }
        let v1 = params[0];
        let operator = params[1];
        let v2 = params[2];
        switch (operator) {
            case '==':
                return (v1 == v2);
            case '!=':
                return (v1 != v2);
            case '===':
                return (v1 === v2);
            case '<':
                return (v1 < v2);
            case '<=':
                return (v1 <= v2);
            case '>':
                return (v1 > v2);
            case '>=':
                return (v1 >= v2);
            case '&&':
                return !!(v1 && v2);
            case '||':
                return !!(v1 || v2);
            default:
                return false;
        }
    }  
    export default Ember.Helper.helper(compare);

I want to be able to import or use this function in my hbs file, how can I do it any help please to fix these two things please - need some help - thank you.
SuggestionRe: Getting this following error: compare.js:1 Uncaught Error: Cannot find module 'ember' Pin
jkirkerx5-Nov-19 11:47
professionaljkirkerx5-Nov-19 11:47 
GeneralRe: Getting this following error: compare.js:1 Uncaught Error: Cannot find module 'ember' Pin
simpledeveloper5-Nov-19 12:14
simpledeveloper5-Nov-19 12:14 
QuestionLoading of a td value using another td value in Ember hbs file Pin
simpledeveloper4-Nov-19 11:32
simpledeveloper4-Nov-19 11:32 
GeneralRe: Loading of a td value using another td value in Ember hbs file Pin
jkirkerx5-Nov-19 12:06
professionaljkirkerx5-Nov-19 12:06 
GeneralRe: Loading of a td value using another td value in Ember hbs file Pin
simpledeveloper5-Nov-19 12:09
simpledeveloper5-Nov-19 12:09 
Questionweb development Pin
Member 142901874-Nov-19 2:14
Member 142901874-Nov-19 2:14 
AnswerRe: web development Pin
phil.o4-Nov-19 2:18
professionalphil.o4-Nov-19 2:18 
GeneralRe: web development Pin
Richard MacCutchan4-Nov-19 2:26
mveRichard MacCutchan4-Nov-19 2:26 
GeneralRe: web development Pin
phil.o4-Nov-19 2:55
professionalphil.o4-Nov-19 2:55 
GeneralRe: web development Pin
F-ES Sitecore4-Nov-19 22:40
professionalF-ES Sitecore4-Nov-19 22:40 
AnswerRe: web development Pin
Pete O'Hanlon5-Nov-19 0:03
mvePete O'Hanlon5-Nov-19 0:03 
QuestionProblem with Geolocation Pin
Member 146374312-Nov-19 10:48
Member 146374312-Nov-19 10:48 
AnswerRe: Problem with Geolocation Pin
A_Griffin2-Nov-19 11:23
A_Griffin2-Nov-19 11:23 
QuestionProblem with Geolocation Pin
Member 1463743128-Oct-19 13:50
Member 1463743128-Oct-19 13:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.