Commonly, we have got an error for undefined values. the value undefined means we declare a variable but never assigned a value to that variable. Because of that When we try to use that value it gives us undefined for that value. There is some more reason for getting undefined.
if we try to get a property from an object but there is no such property available then It gives us undefined for that property
suppose, we created an array with four elements. …
React is a JavaScript library. It’s not a Framework. But before Using it we need to know some basic concept on React. It will help us to understand React properly.
Sometimes we need to update our UI. In DOM API we have to think in a complex way to update the UI. But In React API(which convert to DOM API) we can easily update our UI. Because In DOM API the updates are created an effect on the whole DOM tree. On other hand, React saves the previous version of the UI DOM tree somewhere in memory. when we tell…
Comments are lines of code that JavaScript will intentionally ignore.
There are two ways to write comments in javaScript:
Using // will tell JavaScript to ignore the remainder of the text on the current line.
example:
// This is a single-line comment
using /*….*/ will tell JavaScript to ignore multiline texts.
example:
/*This is a
multi-line comment*/
Comments are a great way to leave notes to your self and to other people who will later need to figure out what a block of code does
JavaScript has a syntax construct try…catch that allows us to “catch” error. The try…catch construct…
JavaScript has some built-in functions for convert Strings into numbers. parseInt() function one of them. parseInt() function takes two arguments, the first argument is the String type number and the second argument is a radix or base number which is optional. the radix number starts from 2 to 32. The radix or base wise first argument is treated by parseInt() function. if the base is not given as the second argument then the first argument will be treated as decimal. if string argument is included with 0x. then parseInt() treat the argument as a hexadecimal
example:
parseInt(“0x100”) // this will…
passionate web developer and I am enthusiast about learning new things for web development