Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

if we run 9119 through the function, 811181 will come out, because 92 is 81 and 12 is 1.

function squareDigits(num){
    return Number(('' + num).split('').map(function (val) { return val * val;}).join(''));
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: chalk js 
Javascript :: how to find repeated characters in a string in javascript 
Javascript :: electron send message from renderer to main 
Javascript :: sticky footer react 
Javascript :: uselocation react 
Javascript :: on refresh react url not working or 404 page not showing react 
Javascript :: javascript hours minutes seconds 
Javascript :: flatten array recursively 
Javascript :: timeout httppost angular 
Javascript :: split 2 arrays javascript 
Javascript :: add numbers in array 
Javascript :: js array comprehension 
Javascript :: formik and yup reactjs 
Javascript :: continuous scrolling js 
Javascript :: hmac_sha256 node 
Javascript :: es6 node 
Javascript :: check a string for unique characters javascript 
Javascript :: get query parameters in node.js 
Javascript :: change css with javascript 
Javascript :: adjacent elements product javascript 
Javascript :: yup number string 
Javascript :: ctx.fillstyle 
Javascript :: random letter from a name js 
Javascript :: how to convert integer to double in javascript 
Javascript :: image preview 
Javascript :: react bootstrap form select 
Javascript :: how to know which button is clicked in jquery 
Javascript :: javascript document.createElement add function 
Javascript :: javascript creeate utc date 
Javascript :: javascript throw error inside then 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =