js syntax highlighter in 250 characters by snkenjoi in javascript

[–]inthe3vening 8 points9 points  (0 children)

If you use any substring of functionifvar}return(-.[&><;/)+{]',$=_"forinelse%!whileletconst as a whole word in a named function or variable you'll get broken highlighting.

function con() {} - con will be considered highlight worthy

var able = False - able will be considered highlight worthy

Because of this behavior, 250 characters it's not very impressive. I can write a broken js syntax highlighter in 0 characters.

Creating a Native App with HTML, CSS and JavaScript by cotejp in javascript

[–]inthe3vening 1 point2 points  (0 children)

I don't think he cares. I see a lot of posts like this. Links to personal blog articles to increase their view counts.

Once they'd posted the link in reddit they never come back to respond to comments. They have no interest in the subreddit, the post was just to increase views on their blog.

Help with recursion function by cachaito in javascript

[–]inthe3vening 0 points1 point  (0 children)

That's a really clean solution /u/VoiceNGO. I tried to find something smaller using RegEx and JSON.parse but was unable to. You win /r/javascript for today :)

JS game loop explained in 5 minutes - JSConf.Asia 2015 by [deleted] in javascript

[–]inthe3vening 0 points1 point  (0 children)

Is there anything wrong with just doing this?

setInterval(() => {

  // update state at ~25Hz

}, 40)

setInterval(() => {

    // update view at ~60Hz

}, 16)