How to use npm jquery module?

To use jquery in node, you need to have two separate node package installations. jquery jsdom to create a dummy window object which jquery can use. Installation: In code: Or, with newer versions of jsdom: Using global.$ will make the jquery object($) available globally in your project.

Finding largest integer in an array in JavaScript

The code below is fixed and should work. The problem was that in this line if (array>largest) { You were not providing the index of the array. By changing the code to this if (array[i]>largest) { it works. Notice that I added the [i] to the end of array in the if statement.

Give a value to an ng-model=”searchText” input based on list item clicked in Angular JS

I think you have a few mistakes in the code: shoud be then I think what you want is Also, I’m not sure what the ng-model on the div is for, as far as I know it is used only for inputs, textareas and selects. See http://docs.angularjs.org/api/ng.directive:ngModel. You probably want something like this fiddle -> http://jsfiddle.net/weSpW/3/.