Why wont my while loop print


#1

The for loop works perfectly. I just dont understand why the while loop wont print to console.

var happy=1
var happy=function(){
    while(happy){
        console.log("I want to dance and sing!");
        happy=0; }};
for(var i=0 ; i<100 ; i+=2){
    console.log(i);
}


#2

It's inside of a function that is not called. Also the name of the function might not be a good choice. So better use different names here.