this shows a country dropdown and then if a selected country name is matched it will show the second part of the form for this test australia is the confirmed country
My tests using the Spread Operator rather than the apply function. In the 1st function show_max_array i use the apply operator to convert the array into comma seperated values. In the show_max_array..
If you don't know how many parameters you will need in your function you can use the rest operator to pass them in. ...
in this exercise i will take a function variable and write it in one line using the arrow function
this function uses the parseInt function to return a proper integer or an error code if it can't. So this demo should return NaN for the Not an Int (x1235) and The int for the 00001235. I think that N..
this will split the string into an array based on the spaces inbetween words. you can split it based on any character, for example if you had words in csv comma format you could use the second example..
generate a random whole number function with test buttons
here is an example showing a variable defined within a function showing how it becomes a global variable if not defined with var
unshift is the opposite of push where push adds to the end of an array unshift will add to the start of the array.
this is a version of a dom ready or document ready that does not require jquery
you can see what is stored in local storage by typing this into your browser console. localStorage Adding something You can add something to local storage by using the setItem function.
pop is the opposite of push and will remove the last item in an array, it also returns the value so you can assign it to a variable
This usually goes in the theme functions file. This will load it after jquery if it requires it. wp_register_script('scriptname', get_template_directory_uri() . '/js/scripts.js', array('jquery'), ..