Category: JavaScript

javascript 0

href javascript ; void 0

The void oper­a­tor is often used to obtain the unde­fined prim­i­tive value. <a href=“javascript:void(0);”> Click Me </a> In this case, it is used to avoid # in the URI bar. The hrefs value will be undefined.…

javascript 0

push vs concat vs spread

push, con­cat and spread all of them are object/array manip­u­la­tion meth­ods. push — mutates the orig­i­nal data var a = [1, 2, 3]; a.push(9); // returns 4 console.log (a); // [1, 2, 3, 9] concat…