title: or logical operator in julia
body: <p>I'm trying to understand how Julia takes <code>or</code> operator. here is the script that I'm practicing with:</p>
  <pre><code>integer = 52
  if length(string(integer)) == 1 || 2
      println(&quot;length is 1 or 2&quot;)
  end
  </code></pre>
  <p>but it gives me this error:</p>
  <pre><code>TypeError: non-boolean (Int64) used in boolean context
  
  Stacktrace:
   [1] top-level scope
     @ In[108]:2
   [2] eval
     @ .\boot.jl:373 [inlined]
   [3] include_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)
     @ Base .\loading.jl:1196
  </code></pre>
  <p>and I'm sure the problem is where I wrote <code>1 || 2</code>! how should I specify it in Julia? and how should I interpret <code>TypeError: non-boolean (Int64) used in boolean context</code> error?</p>