Q:

Javascript .split

This question may seem a little silly, but i just need to know. 
So here is some very basic code i wrote: 
function LongestWord(sen) { 
  var longest = "";
  var check = ""; //I've even changes the value of var check into a integer and still returned the same

  for(var i = 0; i < sen.length; i++){
    check = sen.split(" ");
  }

  return check;              
}

console.log(LongestWord("John Max"));

This is what is returned:
[ 'John', 'Max' ]
Does this mean that when the .split() method is called on a variable, it converts it into an Array no matter which type it is? 

A:

Variables in JavaScript are dynamic; this means that they can change type during the execution of your script. 
For example:
var a = 123; // i'm a number value

a = []; // now i'm an array

a = 'hello'; // and now i'm a string

Any previous value is discarded (*) when a new value is assigned to it. 
That said, the logic in your script can be written like this:
var longest = null;

sen.split(' ').forEach(function(word) {
    if (longest === null || word.length > longest.length) {
        longest = word;
    }
});

return longest;

(*) garbage collection behaviour is different between scalars and non-scalars.