Javascript array and loop -


I need help in trying to get my code working I want to be able to loop my arrays and If the command is to ensure that the array is there. >];

But that does not work. If the command ignores

  var arr = ["150", "- 75"]; True = ragh + "px"; Leftpl = left * 1; If (left & lt; 325) {leftplu = leftpl + 10; Leftplus = leftplus + 'px'; (Var i = 0; i & lt; arr.length; i ++) {if (left-right + arrogance = arr [i]) {document.getElementById ("new"). InnerHTML = leftplu + 'px' + righ + 'px'; }}}   

Can I put "look" in "if (left-right + right! = Arr [i]) if" left-right + true "= ( For var I = 0; i & lt; arr.length; i ++) {arr [i]}) "

I apologize for my poor efforts to understand. I am new to javascript and am trying to learn.

Change it:

  string! = Arr [i]  / Code>  

To do this:

  type [ii]! Type "Typing"   

typewriter and therefore there is no keyword string . Instead, as shown above, you can use the typeof operator to obtain the data type as your stranger.

With this change, your last code should look like this:

  arr = ["1", "2", "3", "4"]; (Var i = 0; i & lt; arr.length; i ++) {if (type type arr [i]! = "String") {// do something}}    

Comments