Is `undefined` a type, a value, or both? [duplicate]












-2
















This question already has an answer here:




  • What is the type of undefined in javascript? [closed]

    2 answers





  1. Is undefined a type (data type), a value, or both?

  2. Can i use prototype to extendundefined





var i;
console.log(i) // => undefined
console.log(typeof i) // => undefined

var j = 2;
console.log(j) // => 2
console.log(typeof j) // => number












share|improve this question













marked as duplicate by Sнаđошƒаӽ, deceze javascript
Users with the  javascript badge can single-handedly close javascript questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 14 '18 at 4:54


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.























    -2
















    This question already has an answer here:




    • What is the type of undefined in javascript? [closed]

      2 answers





    1. Is undefined a type (data type), a value, or both?

    2. Can i use prototype to extendundefined





    var i;
    console.log(i) // => undefined
    console.log(typeof i) // => undefined

    var j = 2;
    console.log(j) // => 2
    console.log(typeof j) // => number












    share|improve this question













    marked as duplicate by Sнаđошƒаӽ, deceze javascript
    Users with the  javascript badge can single-handedly close javascript questions as duplicates and reopen them as needed.

    StackExchange.ready(function() {
    if (StackExchange.options.isMobile) return;

    $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
    var $hover = $(this).addClass('hover-bound'),
    $msg = $hover.siblings('.dupe-hammer-message');

    $hover.hover(
    function() {
    $hover.showInfoMessage('', {
    messageElement: $msg.clone().show(),
    transient: false,
    position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
    dismissable: false,
    relativeToBody: true
    });
    },
    function() {
    StackExchange.helpers.removeMessages();
    }
    );
    });
    });
    Nov 14 '18 at 4:54


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.





















      -2












      -2








      -2









      This question already has an answer here:




      • What is the type of undefined in javascript? [closed]

        2 answers





      1. Is undefined a type (data type), a value, or both?

      2. Can i use prototype to extendundefined





      var i;
      console.log(i) // => undefined
      console.log(typeof i) // => undefined

      var j = 2;
      console.log(j) // => 2
      console.log(typeof j) // => number












      share|improve this question















      This question already has an answer here:




      • What is the type of undefined in javascript? [closed]

        2 answers





      1. Is undefined a type (data type), a value, or both?

      2. Can i use prototype to extendundefined





      var i;
      console.log(i) // => undefined
      console.log(typeof i) // => undefined

      var j = 2;
      console.log(j) // => 2
      console.log(typeof j) // => number







      This question already has an answer here:




      • What is the type of undefined in javascript? [closed]

        2 answers







      var i;
      console.log(i) // => undefined
      console.log(typeof i) // => undefined

      var j = 2;
      console.log(j) // => 2
      console.log(typeof j) // => number





      var i;
      console.log(i) // => undefined
      console.log(typeof i) // => undefined

      var j = 2;
      console.log(j) // => 2
      console.log(typeof j) // => number






      javascript types undefined prototype






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 14 '18 at 4:49









      McKabueMcKabue

      6061716




      6061716




      marked as duplicate by Sнаđошƒаӽ, deceze javascript
      Users with the  javascript badge can single-handedly close javascript questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Nov 14 '18 at 4:54


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









      marked as duplicate by Sнаđошƒаӽ, deceze javascript
      Users with the  javascript badge can single-handedly close javascript questions as duplicates and reopen them as needed.

      StackExchange.ready(function() {
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function() {
      $hover.showInfoMessage('', {
      messageElement: $msg.clone().show(),
      transient: false,
      position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
      dismissable: false,
      relativeToBody: true
      });
      },
      function() {
      StackExchange.helpers.removeMessages();
      }
      );
      });
      });
      Nov 14 '18 at 4:54


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


























          1 Answer
          1






          active

          oldest

          votes


















          1














          undefined



          1. Is undefined a type (data type), a value, or both?




          undefined is a property of the global object; i.e., it is a variable in global scope. The initial value of undefined is the primitive value undefined.




          2. Can i use prototype to extend undefined?




          In modern browsers (JavaScript 1.8.5 / Firefox 4+), undefined is a non-configurable, non-writable property per the ECMAScript 5 specification. Even when this is not the case, avoid overriding it.







          share|improve this answer






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            undefined



            1. Is undefined a type (data type), a value, or both?




            undefined is a property of the global object; i.e., it is a variable in global scope. The initial value of undefined is the primitive value undefined.




            2. Can i use prototype to extend undefined?




            In modern browsers (JavaScript 1.8.5 / Firefox 4+), undefined is a non-configurable, non-writable property per the ECMAScript 5 specification. Even when this is not the case, avoid overriding it.







            share|improve this answer




























              1














              undefined



              1. Is undefined a type (data type), a value, or both?




              undefined is a property of the global object; i.e., it is a variable in global scope. The initial value of undefined is the primitive value undefined.




              2. Can i use prototype to extend undefined?




              In modern browsers (JavaScript 1.8.5 / Firefox 4+), undefined is a non-configurable, non-writable property per the ECMAScript 5 specification. Even when this is not the case, avoid overriding it.







              share|improve this answer


























                1












                1








                1







                undefined



                1. Is undefined a type (data type), a value, or both?




                undefined is a property of the global object; i.e., it is a variable in global scope. The initial value of undefined is the primitive value undefined.




                2. Can i use prototype to extend undefined?




                In modern browsers (JavaScript 1.8.5 / Firefox 4+), undefined is a non-configurable, non-writable property per the ECMAScript 5 specification. Even when this is not the case, avoid overriding it.







                share|improve this answer













                undefined



                1. Is undefined a type (data type), a value, or both?




                undefined is a property of the global object; i.e., it is a variable in global scope. The initial value of undefined is the primitive value undefined.




                2. Can i use prototype to extend undefined?




                In modern browsers (JavaScript 1.8.5 / Firefox 4+), undefined is a non-configurable, non-writable property per the ECMAScript 5 specification. Even when this is not the case, avoid overriding it.








                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 14 '18 at 4:54









                MamunMamun

                26.5k71630




                26.5k71630















                    Popular posts from this blog

                    Xamarin.iOS Cant Deploy on Iphone

                    Glorious Revolution

                    Dulmage-Mendelsohn matrix decomposition in Python