File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2985,7 +2985,24 @@ Regular Expression(Regex):
29852985A regular expression is a group of characters or symbols which is used to find a specific pattern in a text.
29862986
29872987Regular expressions are normally case-sensitive so the regular expression The would not match the string the
2988+ =======================================================================================================================================================================
2989+ Multiple functions:
2990+ var arr = [];
2991+ const checkSort =(a)=>{
2992+ if(!arr.includes(a) && Number.isInteger(a)){
2993+ arr.push(a)
2994+ }
2995+ return console.log(arr.sort((a,b)=>a-b));
2996+ }
2997+ checkSort(5);
2998+ checkSort(4);
2999+ checkSort(2);
3000+ checkSort("abc");
3001+ checkSort("44");
3002+ checkSort(-44);
29883003
3004+ //output: [-44,2,4,5]
3005+ ==================================================================================================================================================================
29893006
29903007
29913008
You can’t perform that action at this time.
0 commit comments