-
-
- PHP preg_replace
let phone="+17778889999"; let p=phone.replace(/^\+1/,'');
- PHP isset
if (typeof variable !== 'undefined')
- PHP array_pop
path_arr.splice(-1,1); //note does not work for array[1]
- PHP implode
var fruits = ["Banana", "Orange", "Apple", "Mango"]; var basket = fruits.join(" and ");
- PHP explode
var abc_string="a,b,c"; let abc_array = abc_string.split(',');
- PHP preg_replace
-