[Question]
  [
### The Task
The task is very simple. Given an array containing **only integers** and **strings**, output the largest number and the smallest number.
### Test Cases
```
Input: [1, 2, 3, 4, 5, 6, 7, 8]
Output: 1, 8
Input: [5, 4, 2, 9, 1, 10, 5]
Output: 1, 10
Input: [7, 8, 10, "Hello", 5, 5]
Output: 5, 10
```
Numbers in strings are not considered integers:
```
Input: [1, 2, 3, 4, "5"]
Output: 1, 4
```
If there is only one integer, it is both the largest and smallest integer:
```
Input: [1]
Output: 1, 1
Input: ["1", "2", "3", "4", 5]
Output: 5, 5
```
### Rules
* You can assume that an array will **always** contains at least one integer.
* All integers are positive (greater than 0)
* The order of the output doesn't matter.
* This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the submission with the least amount of bytes wins!
* Strings can contain all printable ASCII characters (`32 - 126`) and are non-empty.
  
[Answer]
# JavaScript (ES6), 54 ~~56~~
**Edit** 2 bytes saved thx @Neil
Note: `x===+x` is true if and only if `x` is a number
```
a=>[Math.max(...a=a.filter(x=>x===+x)),Math.min(...a)]
```
[Answer]
## Seriously, ~~9~~ 6 bytes
```
,√¨;M@m
```
[Try It Online](http://seriously.tryitonline.net/#code=LMOsO01AbQ&input=WzcsIDgsIDEwLCAiSGVsbG8iLCA1LCA1XQ)
### How it works
```
,                              Read list input
 √¨                             Remove everything but numbers from it
  ;                            Make a copy
   m                           Extract its min value
    @M                         Extract the other one's max value
                               Implicit output (max then min)
```
[Answer]
# Pyth, ~~14~~ ~~11~~ 10 bytes
```
hM_BS^I#1Q
```
[Try it online.](https://pyth.herokuapp.com/?code=hM_BS%5EI%231Q&input=[7%2C+8%2C+10%2C+%22Hello%22%2C+5%2C+5]&debug=0) [Test suite.](https://pyth.herokuapp.com/?code=hM_BS%5EI%231Q&test_suite=1&test_suite_input=[1%2C+2%2C+3%2C+4%2C+5%2C+6%2C+7%2C+8]%0A[5%2C+4%2C+2%2C+9%2C+1%2C+10%2C+5]%0A[7%2C+8%2C+10%2C+%22Hello%22%2C+5%2C+5]%0A[1%2C+2%2C+3%2C+4%2C+%225%22]%0A[1]%0A[%221%22%2C+%222%22%2C+%223%22%2C+%224%22%2C+5]&debug=0)
### Explanation
* `Q`: evaluated input
* `#`: filter that on:
	+ `I`: the value being the same after:
		- `^‚Ä¶1` raising it to power 1
* `S`: sort that
* `_B`: create array `[previous, reversed(previous)]`
* `hM`: take first item of each item of that
The hardest part is to golf the removal of strings, which currently takes 4 bytes. The current approach works due to `^<str>1` taking the first Cartesian power of the sequence (basically, the list of the string's characters), but `^<int>1` is just the identity function.
[Answer]
# Jelly, 8 bytes
```
|f¬π·π¢0,1·ªã
```
[Try it online!](http://jelly.tryitonline.net/#code=fGbCueG5ojAsMeG7iw&input=&args=WzcsIDgsIDEwLCAiSGVsbG8iLCA1LCA1XQ)
### Background
In a perfect world, it would suffice to intersect the list with a flattened version of itself. Strings are simply lists of characters in Jelly, so while the original list would contain integers and strings, the flattened version would contain integers and characters, leaving only the integers in the intersection.
In the real world, both the parsers of both input and string literals yield *characters* instead of strings of length 1. The only way to pass a singleton string to a function would be to encode it "manually" as, e.g., `[‚Äùa]`, which is a character wrapped in an array.
This would save a byte, for a total of **7 bytes** ([Try it online!](http://jelly.tryitonline.net/#code=ZkbhuaIwLDHhu4sKWzEsW-KAnTJdLOKAnDM04oCdLOKAnC014oCdLFvigJ1hXSzigJxiY-KAnV3Dhw&input=)).
```
fF·π¢0,1·ªã
```
Since that's probably not acceptable, we also need a way to differentiate characters from integers.
Jelly's bitwise atoms ~~desperately~~ try to convert their arguments to integers. They start by vectorizing until they encounter types of depth 0 (numbers or characters), then attempt to convert them to integers. For a character that represents an integer, this will be successful. For others, a dyadic, bitwise atom will simply give up and return **0**.
For example, bitwise ORing the list `[1, "2", "34", "-5", "a", "bc"]` with itself will yield
```
[1, 2, [3, 4], [0, 5], 0, [0, 0]]
```
By intersecting the result with the original list, we get rid of the arrays and the integers that weren't present in the original list.
### How it works
```
|f¬π·π¢0,1·ªã  Main link. Input: A (list)
|         Bitwise OR the list A with itself.
 f¬π       Filter the result by presence in A.
   ·π¢      Sort the resulting list of integers.
    0,1·ªã  Retrieve the elements at those indexes.
          Indices are 1-based and modular in Jelly, so 0 is the last (maximum),
          and 1 is the first (minimum).
```
[Answer]
# Ruby, ~~57~~ ~~36~~ 29 bytes
Newbie here, so I don't know if there is any standard or universally accepted place/way to calculate bytes used, any help would be very appreciated!
*Edited as per manatwork & Doorknob's comment!*
```
->n{(n.map(&:to_i)&n).minmax}
```
**Test**
```
2.3.0 :076 > f=->n{[(n.map(&:to_i) & n).min, (n.map(&:to_i) & n).max]}
 => #<Proc:0x007ff7650ee868@(irb):76 (lambda)>
2.3.0 :077 > f[[7, 8, 10, "Hello", 5, 5]]
 => [5, 10]
```
[Answer]
# Python 2, 42 bytes
In Python 2, integers are always less than strings during comparisons, so a simple `min(s)` will find the smallest integer. When finding the maximum though, we must filter out strings first. The anonymous function accepts a sequence and returns a tuple with the minimum and maximum.
```
lambda s:(min(s),max(x for x in s if''>x))
```
Example:
```
[1,'77', 6, '', 4] -> (1, 6)
```
[Answer]
# Mathematica, 20 bytes
```
MinMax@*Select[#>0&]
```
---
**Test cases**
```
MinMax@*Select[#>0&]@{1,2,3,4,"5"}
(* {1,4} *)
```
[Answer]
## CJam, ~~15~~ 13 bytes
```
{_:z&$2*_,(%}
```
An unnamed block (function) which expects the input array on the stack and leaves the output array in its place.
[Run all test cases.](http://cjam.aditsu.net/#code=%5B1%202%203%204%205%206%207%208%5D%0A%5B5%204%202%209%201%2010%205%5D%0A%5B7%208%2010%20%22Hello%22%205%205%5D%0A%5B1%202%203%204%20%225%22%5D%0A%5B1%5D%0A%5B%221%22%20%222%22%20%223%22%20%224%22%205%5D%5D%0A%0A%7B_%3Az%26%242*_%2C(%25%7D%25%0A%0A%3Ap&input=%5B7%208%2010%20%22Hello%22%205%205%5D)
### Explanation
```
_     e# Duplicate.
:z    e# Map over list: a) take abs() of integer elements (a no-op) or b) wrap strings
      e# in an array.
&     e# Set intersection: only the integers will appear in both arrays.
$     e# Sort.
2*    e# Repeat array twice (to make the code work with single-integer input).
_,    e# Duplicate, get length N.
(%    e# Decrement, get every (N-1)th element, i.e. the first and the last.
```
[Answer]
## Haskell, ~~41~~ 39 bytes
```
f x=[minimum,maximum]<*>[[i|Left i<-x]]
```
In Haskell all elements of a list have to be of the same type, so I cannot mix `Integer` and `String`. However, there's the `Either` type for combining two types into a single one. The input list is therefore of type `Either Integer String`1. `f` filters the Integers, removes the `Either` wrapper, puts the list as the single element in a new list (e.g. `[[1,2,3]]`), so that `<*>` can apply the functions given in the first argument to it. 
Usage example: `f [Left 1, Left 3, Right "Hello", Left 2]` -> `[1,3]`.
Edit: @xnor brought `<*>` into play and saved 2 bytes. Thanks!
---
1 actually it's fully polymorphic in the second type as the `String` property is never used.
[Answer]
# jq, 21 characters
```
[.[]|numbers]|min,max
```
Sample run:
```
bash-4.3$ bin/jq '[.[]|numbers]|min,max' <<< '[7, 8, 10, "Hello", 5, 5]'
5
10
```
On-line test:
* [[7, 8, 10, "Hello", 5, 5]](https://jqplay.org/jq?q=[.[]|numbers]|min,max&j=[7,%208,%2010,%20%22Hello%22,%205,%205])
* [["1", "2", "3", "4", 5]](https://jqplay.org/jq?q=[.[]|numbers]|min,max&j=[%221%22,%20%222%22,%20%223%22,%20%224%22,%205])
[Answer]
# Mathematica, 28 bytes
```
MinMax[#/._String->Nothing]&
```
[Answer]
## Perl ~~44~~ 39 + 3 = 41 bytes
```
@a=sort{$a-$b}grep!/"/,@F;$_="@a[0,-1]"
```
Requires `-pa` flags:
```
$ perl -pae'@a=sort{$a-$b}grep!/"/,@F;$_="@a[0,-1]"' <<< '1 2 3 5 4'
1 5
$ perl -pae'@a=sort{$a-$b}grep!/"/,@F;$_="@a[0,-1]"' <<< '1 2 3 4 "5"'
1 4
```
Thanks to [@manatwork](https://codegolf.stackexchange.com/users/4198/manatwork) for shaving off a few bytes
[Answer]
# PHP, ~~50~~ 48 bytes
```
<?=min($a=array_filter($a,is_int)).', '.max($a);
```
[Answer]
# [Retina](https://github.com/mbuettner/retina), 71
Thanks (as always) to @MartinB√ºttner for the golfing help.
Not competitive golf-wise, but its interesting to implement integer bubble sorting in Retina.
Assumes all strings in the input are `"` double-quoted and don't contain any escaped double quotes `\"`.
```
A`"
¬∂
 
\d+
$&$*a $&$*a
+`\b(a+) +\1(a+)\b
$1$2 $1
 +[a ]+ +
 
(a)+
$#1
```
Input is newline-separated.
[Try it online.](http://retina.tryitonline.net/#code=QWAiCsK2CiAKXGQrCiQmJCphICQmJCphCitgXGIoYSspICtcMShhKylcYgokMSQyICQxCiArW2EgXSsgKwogCihhKSsKJCMx&input=Nwo4CjEwCiJIZWxsbyIKIjIiCjUKNQ&debug=on)
[Answer]
## *Mathematica*, 14
```
#&@@@MinMax@#&
```
Example:
```
tests = {
   {1, 2, 3, 4, 5, 6, 7, 8},
   {5, 4, 2, 9, 1, 10, 5},
   {7, 8, 10, "Hello", 5, 5},
   {1, 2, 3, 4, "5"},
   {1},
   {"1", "2", "3", "4", 5}
 };
# & @@@ MinMax@# & /@ tests
```
> 
> 
> ```
> {{1, 8}, {1, 10}, {5, 10}, {1, 4}, {1, 1}, {5, 5}}
> 
> ```
> 
> 
Explanation:
When `MinMax` gets non-numeric input it reduces the problem as far as it can, then leaves terms wrapped in `Min` and `Max`:
```
MinMax @ {7, 8, 10, "Hello", 5, 5}
```
> 
> 
> ```
> {Min[5, "Hello"], Max[10, "Hello"]}
> 
> ```
> 
> 
Due to the automatic ordering that takes place strings follow integers.
`Apply` at *levelspec* {1}, shorthand `@@@`, is then used to pull the first argument of non-atomic elements. Note that `5` is untouched here:
```
foo @@@ {5, Max[10, "Hello"]}
```
> 
> 
> ```
> {5, foo[10, "Hello"]}
> 
> ```
> 
> 
[Answer]
# Oracle SQL 11.2, 189 bytes
```
SELECT MIN(TO_NUMBER(i)),MAX(TO_NUMBER(i))FROM(SELECT REGEXP_SUBSTR(:1,'[^,]+',1,LEVEL)i FROM DUAL CONNECT BY LEVEL<REGEXP_COUNT(:1,',')+2)WHERE TRIM(TRANSLATE(i,' 0123456789',' '))IS NULL;
```
Un-golfed
```
SELECT MIN(TO_NUMBER(i)),MAX(TO_NUMBER(i)) 
FROM  (
        SELECT REGEXP_SUBSTR(:1,'[^,]+',1,LEVEL)i 
        FROM   DUAL 
        CONNECT BY LEVEL<REGEXP_COUNT(:1,',')+2
      )
WHERE TRIM(TRANSLATE(i,' 0123456789',' '))IS NULL;
```
The sub-query parse the array and split it to populate a view with one element per row.
Then the non numeric elements are filtered out.
I wish I could have found a way to do it with LEAST and GREATEST, but no luck with how to handle the array as a parameter.
[Answer]
## vimscript, 25 bytes
```
g/"/d
sort n
t.
t.
2,$-1d
```
Yep, that's right, vimscript.
Expects input in the form
```
1
2
3
4
"5"
```
And outputs in the form
```
1
4
```
Explanation:
```
g/"/d    delete all lines that contain quotes
sort n   sort numerically
t.       duplicate the first line
t.       duplicate it again
2,$-1d   delete from line 2 to line (END-1)
```
The first line needs to be duplicated *twice* to handle the edge case of an input of a single number. This is because the last command will complain if there are only two lines when it is reached, since it ends up being `2,1d` which is a backwards range.
[Answer]
# Julia, 35 bytes
```
x->extrema(filter(i->isa(i,Int),x))
```
This is a lambda function that accepts an array and returns a tuple of integers. To call it, assign it to a variable.
Julia has a built-in function `extrema` for getting the minimum and maximum elements of an array as a tuple. However, since the array can also have strings in it, we first have to filter those out. We can do that by testing whether each element is an integer using `isa`.
[Answer]
# Japt, 23 bytes
```
[V=Uf_bZ√Én@X-Y})g Vw g]
```
[Test it online!](http://ethproductions.github.io/japt?v=master&code=W1Y9VWZfYlrDbkBYLVl9KWcgVncgZ10=&input=WzUgMiAzIDkgIjEiXQ==)
### How it works
```
[V=Uf_  bZ√É n@  X-Y})g Vw g]
[V=UfZ{ZbZ} nXY{X-Y})g Vw g]
UfZ{ZbZ}   // Filter out the items Z in U where Z.b(Z) is falsy.
           // For numbers, this the original number, which is always non-0 (non-falsy).
           // For strings, this returns Z.indexOf(Z), which is always 0 (falsy).
nXY{X-Y}   // Sort by subtraction. Small items move to the front, large to the back.
V=         // Set variable V to the resulting array.
)g Vw g    // Take the first item in V, and the first in V.reverse().
[       ]  // Wrap them in an array so both are sent to output.
```
[Answer]
# Python 3, 56 bytes
```
lambda x:[m(t for t in x if str(t)!=t)for m in(min,max)]
```
Try it online on [Ideone](http://ideone.com/iBnrXH).
[Answer]
## Bash, ~~40~~ ~~31~~ 30 bytes
```
sort -n|sed /\"/d|sed '1p;$p;d'
```
Requires a line separated list:
```
$ echo $'5\n4\n2\n9\n1\n"10"\n5' | sort -n|sed /\"/d|sed '1p;$p;d'
1
9
```
Thanks to [@manatwork](https://codegolf.stackexchange.com/users/4198/manatwork) to shave off a few bytes
[Answer]
## PowerShell, ~~53~~ 36 bytes
```
@($args[0]|?{$_-is[int]}|sort)[0,-1]
```
Saved 17 bytes thanks to [@goric](https://codegolf.stackexchange.com/users/10734/goric)
***OOOF*** ... PowerShell usually plays pretty fast and loose with casting, which is normally a good thing for golfing, but hurts it here.
Takes our input `$args[0]` and pipes it into a `Where-Object` statement (the `?`) that will only select integers and passes them along the pipeline, discarding anything else. Since dynamic re-casting happens on-the-fly in the background for you (e.g., `1+"5"` returning `6` is perfectly valid PowerShell), we need to use the [`-is` operator](https://technet.microsoft.com/en-us/library/hh847763(v=wps.620).aspx) in order to differentiate between the data types.
From there, we pipe that collection into `Sort-Object`, which will sort the integers from smallest to largest. The outer `()` is necessary so we can reference the first and last elements with `[0,-1]` (i.e., the smallest and the largest), but note we also need the outer `@` to force casting the output of `sort` as an array if there's only one object (as the result of the `?`, or only one object was input).
[Answer]
# [MATL](https://esolangs.org/wiki/MATL), 23 bytes
```
"@Y:tX%1)2\?x]N$htX<wX>
```
[**Try it online!**](http://matl.tryitonline.net/#code=IkBZOnRYJTEpMlw_eF1OJGh0WDx3WD4&input=ezcsIDgsIDEwLCAnSGVsbG8nLCA1LCA1fQ)
```
"       % implicitly input cell array. For loop that iterates on each cell
  @     %   push each cell
  Y:    %   cell's contents (either a number or a string)
  tX%   %   duplicate and push class. This will produce 'char'  or 'double'
  1)    %   get first letter: either 'c' or 'd'
  2\    %   is its ASCII code odd?
  ?     %   if so...
    x   %     delete (it's a string)
  ]     %   end if
  N$h   %   concatenate all stack into an array. This array will contain up to
        %   three numbers: minimum up to now, maximum up to now, new value (if any)
  tX<   %   duplicate. Push minimum
  wX>   %   swap. Push maximum.
        % implicitly end for
        % implicitly display stack contents
```
[Answer]
# JavaScript (ES5), 105 bytes
```
function a(b){m=Math;b=b.filter(function(c){return c===+c});alert(m.min.apply(m,b)+','+m.max.apply(m,b))}
```
Usage: `a([1,2,3,'4'])`
Just trying :)
"Ungolfed":
```
function a(b){
  m=Math;
  b=b.filter(function(c){
    return c===+c
  });
  alert(m.min.apply(m,b) + ',' + m.max.apply(m,b))
}
```
[Answer]
# Pyth, 11 bytes
```
hJSf!>TkQeJ
```
Explanation:
```
   f    Q   - filter([V for T in >], Q)
    !>Tk    - not(T>"")
  S         - sorted(^)
hJ       eJ - print first and last element
```
[Try it here!](http://pyth.herokuapp.com/?code=hJSf!%3ETkQeJ&input=%5B7%2C+8%2C+10%2C+%22Hello%22%2C+5%2C+5%5D&debug=0)
[Answer]
# [Perl 6](http://perl6.org), 25 bytes
The obvious answer would be this WhateverCode lambda
```
*.grep(Int).minmax.bounds
```
---
If it has to be a full program
```
put get.words¬ª.&val.grep(Int).minmax.bounds
```
The input to this full program is a space separated list of values
---
### Usage
```
# give it a lexical name
my &code = *.grep(Int).minmax.bounds;
say code [1, 2, 3, 4, 5, 6, 7, 8];  # (1 8)
say code [5, 4, 2, 9, 1, 10, 5];    # (1 10)
say code [7, 8, 10, "Hello", 5, 5]; # (5 10)
say code [1, 2, 3, 4, "5"];         # (1 4)
say code [1];                       # (1 1)
say code ["1", "2", "3", "4", 5];   # (5 5)
say code []; # (Inf -Inf)
```
[Answer]
# ùîºùïäùïÑùïöùïü, 16 chars / 20 bytes
```
[–ú∆≤(√Ø‚áî‚í°‚âî=+$‚∏©,–ú∆µ√Ø
```
`[Try it here (Firefox only).](http://molarmanful.github.io/ESMin/interpreter3.html?eval=true&input=%5B7%2C%208%2C%2010%2C%20%22Hello%22%2C%205%2C%205%5D&code=%5B%D0%9C%C6%B2%28%C3%AF%E2%87%94%E2%92%A1%E2%89%94%3D%2B%24%E2%B8%A9%2C%D0%9C%C6%B5%C3%AF)`
Not bad, not bad...
# Explanation
This outputs an array containing both the maximum and minimum. `(√Ø‚áî‚í°‚âî=+$‚∏©,` basically filters out all strings in the input, `–ú∆≤` gets the maximum in the input, and `–ú∆µ` gets the minimum.
Just a note: this is the first challenge where I get to use `‚áî`, which basically turns `√Ø‚áî` into `√Ø=√Ø`.
[Answer]
# [PARI/GP](http://pari.math.u-bordeaux.fr/), 52 bytes
This is terrible -- there has to be a better way to check if something is a number than `type`. `polcoeff(eval(x),0)` is even worse, despite (ab)using the requirement that numbers are positive. `iferr(O(x);1,E,0)` is clever but a byte longer: `E` is required for some reason, and *p*-adic numbers like `O(3)` are falsy (i.e., `O(3)==0`) so the `;1` is needed.
```
v->v=[x|x<-v,type(x)=="t_INT"];[vecmin(v),vecmax(v)]
```
An alternate approach is just as long:
```
v->[f([x|x<-v,type(x)=="t_INT"])|f<-[vecmin,vecmax]]
```
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), 13 bytes
```
(‚åä/,‚åà/)‚éïAV~‚ç®‚àä
```
[Try it online!](https://tio.run/nexus/apl-dyalog#@5/2qG2CxqOeLn2dRz0d@pqP@qY6htU96l3xqKPrv1tRfq5XsL8fUIm5oanlo55t/9MUYIIK6tGGOgpGOgrGOgomOgqmOgpmOgrmOgoWsepcKKpMwfJAhZY6CkAdhgZAxehqQPogUkoeqTk5@UpgAzGUIVuoZKqEIY0uoGQINEjJCEQYgwgTJbChAA "APL (Dyalog Unicode) ‚Äì TIO Nexus")
`‚àä`‚ÄÉenlist (flatten ‚Äì this makes all the strings into characters in the big list)
`‚éïAV~‚ç®`‚ÄÉremove all characters in the **A**tomic **V**ector (the character set ‚Äì leaves numbers)
`(`‚Ä¶`)`‚ÄÉapply the following tacit function:
‚ÄÉ`‚åä/`‚ÄÉthe minimum across
‚ÄÉ`,`‚ÄÉappended to
‚ÄÉ`‚åà/`‚ÄÉthe maximus across
[Answer]
# [Java (OpenJDK 8)](http://openjdk.java.net/), 124 bytes
```
a->{int s[]={0,0},t;for(Object i:a)try{t=(int)i;s[0]=s[0]<1|t<s[0]?t:s[0];s[1]=s[1]<t?t:s[1];}catch(Exception e){}return s;}
```
[Try it online!](https://tio.run/##rVDLTsMwELz3K1Y5JZIbxX3waBoQByQulEOPVQ6u64JD6kT2plAFf3uw01biTi7j9T5mZ6dgRzauaqGK3WfHS2YMvDKp2hGAVCj0nnEBK//tE5scePi2LQT3IYtSV7AjBwYZSg4rUJBBx8YPresGs8mzNiGJJZjuK32ZBLlgEepTi1nouiKZmk2SZx6W9AeXPnjEhX9chfoKzZfYp2ieWs6Qf4TP31zUKCsFImqtFthoBSa1Xer11M22dHouso6V3MHB3RWuUUv13ms/H7U@GRSHuGowrl0JSxUWzpO4QVnGT1qzk4mxOo@FKuahEl9wdaClBCYEpgRmBOYEbgjcErizUdQ781/2ec/rFtwTcJto4pYMxe11nimDF1GWVdAfMBj9X2OCeTAUbUCdzmDiYephFgyp@UpkR7b7BQ "Java (OpenJDK 8) ‚Äì Try It Online")
Java 8 lambda function, takes array as input and gives out array `{min, max}`. Non competing, because the input has to be an integer array.
Fixed and -1 byte thanks to Kevin Cruijssen
]